Files
ColdBreeze-chat-web/.github/workflows/release.yml
T

52 lines
1.1 KiB
YAML

name: Release Build
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if tag is on main branch
run: |
git fetch origin main
if ! git merge-base --is-ancestor ${{ github.sha }} origin/main; then
echo "Tag is not on main branch"
exit 1
fi
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install
- run: pnpm build:release
- name: Package files
run: |
cd build
zip -r ../web.vocechat.zip . -x robots.txt CNAME email.tpl.html widget_demo.html
cd ..
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
web.vocechat.zip
build/web.vocechat.md5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}