π Release #31
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 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-20.04, selfhosted-macos, windows-2019] | |
| opts: [""] | |
| include: | |
| - os: selfhosted-macos | |
| opts: "--arch amd64" # or maybe x86_64? | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| - name: node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 16 | |
| 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@v3 | |
| with: | |
| name: native-addon | |
| path: packages/fuzzer/prebuilds | |
| if-no-files-found: error | |
| release: | |
| name: release | |
| needs: [prebuilds] | |
| runs-on: ubuntu-20.04 | |
| permissions: | |
| contents: write # for creating releases | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| - name: node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 16 | |
| cache: "npm" | |
| registry-url: https://gitlab.code-intelligence.com/api/v4/projects/89/packages/npm/ | |
| - name: install | |
| run: npm ci | |
| - name: build | |
| run: npm run build | |
| - name: download prebuilds | |
| uses: actions/download-artifact@v3 | |
| with: | |
| name: native-addon | |
| path: packages/fuzzer/prebuilds | |
| if-no-files-found: error | |
| - 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 |