chore: release v0.1.1 #1
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: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # for OIDC | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24.x" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run tests | |
| run: bun test | |
| - name: Build the project | |
| run: bun run build | |
| - name: Publish to npm | |
| # Authentication will be done via OIDC, not NPM_TOKEN | |
| run: npm publish --provenance --access public | |
| # In Bun, there is no `provenance`, so use npm | |
| # https://github.com/oven-sh/bun/issues/15601 | |
| changelog: | |
| needs: publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # for creating releases | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Create GitHub Release | |
| run: bunx [email protected] | |
| env: | |
| # Automatically provided by GitHub Actions | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |