Initial commit #2
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: Build And Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| dist_command: npm run dist:linux | |
| - os: windows-latest | |
| dist_command: npm run dist:win | |
| - os: macos-latest | |
| dist_command: npm run dist:mac | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.14.1 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: npm test | |
| - name: Build distributables | |
| run: ${{ matrix.dist_command }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload packaged artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.os }} | |
| path: | | |
| dist/*.AppImage | |
| dist/*.exe | |
| dist/*.dmg | |
| dist/*.zip | |
| if-no-files-found: error | |
| release: | |
| name: Publish Release Assets | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download packaged artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-assets | |
| pattern: dist-* | |
| merge-multiple: true | |
| - name: Publish rolling main release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: main-build | |
| target_commitish: ${{ github.sha }} | |
| name: Main Build | |
| prerelease: true | |
| generate_release_notes: false | |
| body: | | |
| Automated binaries built from the latest commit on `main`. | |
| Commit: ${{ github.sha }} | |
| files: | | |
| release-assets/*.AppImage | |
| release-assets/*.exe | |
| release-assets/*.dmg | |
| release-assets/*.zip | |
| fail_on_unmatched_files: true |