-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 825 Bytes
/
Copy pathpublish.yaml
File metadata and controls
37 lines (33 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
with:
ref: main
- 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
with:
commit_message: update package.json version
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}