build: Fix npm run benchmark #18
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 Please | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| release-type: node | |
| upload-linux-packages: | |
| needs: release-please | |
| runs-on: ubuntu-24.04 | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: npm install | |
| run: npm install | |
| - name: Build web distribution | |
| run: npm run build | |
| - name: Build Electron packages in Docker | |
| run: | | |
| docker run --rm \ | |
| -v "$(pwd)":/project \ | |
| electronuserland/builder:latest \ | |
| /bin/bash -c "cd /project && npm run electron:build" | |
| - name: Upload Linux Release Artifacts | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ needs.release-please.outputs.tag_name }} \ | |
| out/dist/*.deb \ | |
| out/dist/*.rpm | |
| upload-windows-packages: | |
| needs: release-please | |
| runs-on: windows-latest | |
| if: ${{ needs.release-please.outputs.release_created }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: npm install | |
| run: npm install | |
| - name: Build web distribution | |
| run: npm run build | |
| - name: Build Windows Electron package | |
| run: npm run electron:build -- --publish never | |
| - name: Upload Windows Release Artifacts | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ needs.release-please.outputs.tag_name }} out/dist/*.exe |