Skip to content

BunKill v1.0.4

BunKill v1.0.4 #3

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run tests
run: bun run test
- name: Build package
run: bun run build
- name: Configure npm auth
if: env.NPM_TOKEN != ''
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to npm
run: |
if [ -n "${NPM_TOKEN}" ]; then
bun publish --access public
else
npm publish --provenance --access public
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}