Skip to content

ci: install Bun on runner before npm ci #2

ci: install Bun on runner before npm ci

ci: install Bun on runner before npm ci #2

Workflow file for this run

# CI workflow to build and publish the package to npm
# Uses Trusted Publisher (OIDC). Configure Trusted Publisher in npm package settings and choose this repository + workflow filename.
# Triggers on version tags (v*.*.*) and when a GitHub Release is published
name: Publish to npm
on:
push:
tags:
- 'v*.*.*'
release:
types: [published]
# Request an OIDC token so npm can verify this workflow as a trusted publisher
permissions:
contents: read
id-token: write
packages: write
jobs:
publish:
name: Build and publish package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Setup Node.js and enable npm cache
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build bundle
run: npm run build:bundle
- name: Publish to npm (via Trusted Publisher OIDC)
run: npm publish --access public