v3.2.0 #31
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: NPM Package (Bun) | |
| on: | |
| release: | |
| types: [created] # Triggers only when a release is created | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| registry-url: https://registry.npmjs.org/ | |
| - run: bun install --frozen-lockfile | |
| - run: bun test | |
| - name: Login to npm | |
| run: | | |
| cat > ~/.npmrc << EOF | |
| //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | |
| registry=https://registry.npmjs.org/ | |
| EOF | |
| - name: Build and publish | |
| run: | | |
| bunx npm whoami | |
| bun run build | |
| bunx npm publish --access public | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |