Client/.github/workflows/build.yml

48 lines
1018 B
YAML
Raw Normal View History

name: Publish Build
on:
push:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Set up Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Pack into zip and create installer
run: npm run dist
- name: Upload Artifacts
uses: actions/upload-artifact@master
with:
path: dist
publish-release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@master
- name: Unzip artifact
run: unzip artifact.zip
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "*-ia32-win.zip,*.exe"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}