v1.4.0 #12
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 to NPM | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| name: Publish Package | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: npm-publish-${{ github.event.release.tag_name }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.release.tag_name }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| package-manager-cache: false | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Verify release version | |
| env: | |
| RELEASE_TAG: ${{ github.event.release.tag_name }} | |
| run: | | |
| package_version="$(node -p "require('./package.json').version")" | |
| if [[ "v${package_version}" != "$RELEASE_TAG" ]]; then | |
| echo "Release tag $RELEASE_TAG does not match package version v${package_version}." >&2 | |
| exit 1 | |
| fi | |
| - name: Typecheck | |
| run: bun run typecheck | |
| - name: Run tests | |
| run: bun run test -- --run | |
| - name: Build package | |
| run: bun run build | |
| - name: Publish to npm | |
| run: npm publish --access public |