Skip to content

fix: fall back to musl binary when gnu prebuild fails to load (#9) #9

fix: fall back to musl binary when gnu prebuild fails to load (#9)

fix: fall back to musl binary when gnu prebuild fails to load (#9) #9

Workflow file for this run

name: Release
# On every push to main: run the full CI suite (tests, audit, and all 7 native
# target builds — the same jobs PRs run), then let semantic-release decide the
# version from the conventional commits, publish the fat package to npm, and
# cut a GitHub release. No-op if no releasable commits.
on:
push:
branches: [main]
permissions: {}
jobs:
# Reuse the full PR suite as the release gate; the build jobs in it upload
# the prebuild artifacts that the release job below packages.
ci:
permissions:
contents: read
uses: ./.github/workflows/ci.yml
release:
name: Release
needs: ci
runs-on: ubuntu-latest
environment: npm-trusted-publisher
permissions:
id-token: write # for publishing releases (OIDC: secret-service + npm trusted publishing)
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
package-manager-cache: false
- name: Install
run: yarn install --immutable
# Stage the fat package's prebuilt binaries before semantic-release packs.
- name: Collect prebuilds
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
- name: Flatten into package root
run: |
mv artifacts/*/index.*.node .
mv artifacts/binding/binding.js artifacts/binding/binding.d.ts .
ls -la index.*.node binding.js binding.d.ts
- name: Verify all targets present
run: node scripts/check-prebuilds.js
- name: Get GitHub app token
id: secret-service
uses: electron/secret-service-action@3476425e8b30555aac15b1b7096938e254b0e155 # v1.0.0
- name: Run semantic release
uses: electron/semantic-trusted-release@03517840010ba30fe5264f4875f4cff066b658d1 # v1.1.0
with:
github-token: ${{ fromJSON(steps.secret-service.outputs.secrets).GITHUB_TOKEN }}