fix CI: use yarn v4 with corepack and --immutable #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| platform: mac | |
| - os: windows-latest | |
| platform: win | |
| - os: ubuntu-latest | |
| platform: linux | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install Python setuptools (needed by node-gyp) | |
| run: pip install setuptools | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build app | |
| run: yarn build | |
| - name: Package for ${{ matrix.platform }} | |
| run: yarn electron-builder --${{ matrix.platform }} --publish never | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.platform }} | |
| path: | | |
| dist/*.dmg | |
| dist/*.zip | |
| dist/*.exe | |
| dist/*.AppImage | |
| dist/*.deb | |
| if-no-files-found: error | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* | |
| draft: true | |
| generate_release_notes: true |