v2.3.0 #23
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: Publish Package to npmjs | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| prebuilds: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| arch: x64 | |
| - os: ubuntu-24.04-arm | |
| arch: arm64 | |
| - os: macos-latest | |
| arch: arm64 | |
| # macOS x64 prebuild publication is temporarily disabled. | |
| # - os: macos-15-intel | |
| # arch: x64 | |
| # Windows prebuild publication is temporarily disabled. | |
| # - os: windows-latest | |
| # arch: x64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| # Windows-only node-gyp setup stays disabled with the Windows matrix. | |
| # - if: runner.os == 'Windows' | |
| # run: npm install -g node-gyp | |
| - run: bun install --ignore-scripts | |
| - run: bun run prebuild | |
| - run: node test/test.js | |
| - run: bun ./test/test.js | |
| - uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: prebuilds-${{ matrix.os }}-${{ matrix.arch }} | |
| path: prebuilds | |
| if-no-files-found: error | |
| publish: | |
| needs: prebuilds | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| path: prebuilds | |
| merge-multiple: true | |
| - run: bun scripts/prepublish.ts | |
| - run: npm publish --access public --tag latest --provenance |