9.0.0-rc.5 #14
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: Prebuild, Create Release, Publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
node-version: [24.x] | |
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022] | |
target: ["20.0.0", "22.0.0", "24.0.0"] | |
runs-on: ${{ matrix.os }} | |
permissions: | |
id-token: write | |
contents: write | |
attestations: write | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
registry-url: 'https://npm.pkg.github.com' | |
- if: runner.os == 'Linux' | |
run: > | |
sudo add-apt-repository ppa:kisak/turtle && | |
sudo apt update && | |
sudo apt-get install -y build-essential libgl1-mesa-dri libglapi-mesa libglew-dev libglu1-mesa-dev libosmesa6 libxi-dev mesa-utils pkg-config | |
- run: npm ci --ignore-scripts | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prebuild and Publish | |
shell: bash | |
run: node ./node_modules/prebuild/bin.js -t ${{ matrix.target }} --strip --include-regex "\.(node|dylib|dll|so)$" -u ${{ secrets.GITHUB_TOKEN }} --verbose | |
- name: Prebuild and Publish (musl) | |
if: runner.os == 'Linux' | |
shell: bash | |
run: node ./node_modules/prebuild/bin.js --libc=musl -t ${{ matrix.target }} --strip --include-regex "\.(node|dylib|dll|so)$" -u ${{ secrets.GITHUB_TOKEN }} --verbose | |
- name: Attest | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: 'prebuilds/*.tar.gz' | |
publish: | |
name: Publish to NPM | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '24.x' | |
registry-url: 'https://registry.npmjs.org' | |
cache: 'npm' | |
- run: npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |