π Release #24
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: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| prebuilds: | |
| name: create prebuilds | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] | |
| opts: [""] | |
| include: | |
| - os: macos-latest | |
| opts: "--arch arm64" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| - name: MSVC (windows) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| if: contains(matrix.os, 'windows') | |
| - name: install dependencies | |
| run: npm ci | |
| - name: build | |
| run: | | |
| npm run prebuild --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }} | |
| npm run build --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }} | |
| - name: upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: | |
| native-addon-${{ matrix.os }}${{ matrix.opts && '-arm64' || '' }} | |
| path: packages/fuzzer/prebuilds | |
| if-no-files-found: error | |
| verify-prebuilds: | |
| name: verify prebuilds | |
| needs: [prebuilds] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: download prebuilds | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: native-addon-* | |
| path: prebuilds | |
| merge-multiple: true | |
| - name: list prebuilds | |
| run: ls -lh prebuilds/ | |
| publish: | |
| name: publish | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [prebuilds] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for creating releases | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| registry-url: https://registry.npmjs.org | |
| - name: install | |
| run: npm ci | |
| - name: build | |
| run: npm run build | |
| - name: download prebuilds | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: native-addon-* | |
| path: packages/fuzzer/prebuilds | |
| merge-multiple: true | |
| - name: publish | |
| run: npm publish --workspaces --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}} | |
| # create GitHub release | |
| - name: read version | |
| id: read-version | |
| run: | | |
| echo ::set-output name=version::\ | |
| $(cat ./package.json | jq '.version' | tr -d '"') | |
| shell: bash | |
| - name: create release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: Release ${{ steps.read-version.outputs.version }} | |
| body_path: ./.github/release_template.md | |
| generate_release_notes: true |