diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index c9b8d6b..80e3772 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -1,34 +1,29 @@ -name: Windows Build +name: Build/Release on: - push: - tags: - - 'v*' - workflow_dispatch: + push: + branches: + - main + tags: + - 'v*' jobs: - build: - runs-on: ubuntu-latest - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + release: + runs-on: windows-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 + steps: + - name: Check out repository + uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: npm + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm - - name: Install dependencies - run: npm ci - - - name: Generate Windows icons - run: npm run prebuild:win - - - name: Build Windows artifacts - uses: electron-builder/action@v1 - with: - args: --win --x64 + - name: Build/release Electron app + uses: samuelmeuli/action-electron-builder@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + release: ${{ startsWith(github.ref, 'refs/tags/v') }} + args: --win --x64