v1.0.4 #11
Workflow file for this run
This file contains 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 package to npmjs | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
registry: | |
- url: 'https://registry.npmjs.org' | |
token: NPM_TOKEN | |
- url: 'https://npm.pkg.github.com' | |
token: GH_TOKEN | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: 🛒 Checkout branch | |
uses: actions/checkout@v4 | |
- name: ✨ Install bun | |
uses: oven-sh/setup-bun@v1.1.1 | |
with: | |
bun-version: 1.0.35 | |
- name: ✨ Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: '${{ matrix.registry.url }}' | |
- uses: actions/cache@v4 | |
name: 📦 Setup deps cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/bun.lockb') }} | |
restore-keys: | | |
${{ runner.os }}-modules- | |
- name: ➕ Install dependencies | |
run: bun install --frozen-lockfile | |
- name: 📦 Build | |
run: bun run build | |
- name: 🔖 Release | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets[matrix.registry.token] }} |