chore: update github action publish #14
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 to NPM | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+*" | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./package | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: "1.0.0" | |
- run: bun i | |
- run: bun test | |
- run: bun run build | |
- name: update version in package json | |
run: bun ./scripts/publish.js ${GITHUB_REF} | |
- name: Commit package.json updates | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |