Skip to content

Commit ef52ef7

Browse files
committed
Fixed publish
1 parent d0bf426 commit ef52ef7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66

77
jobs:
88
push:
9+
permissions:
10+
contents: write
11+
id-token: write
912
runs-on: ubuntu-latest
1013
steps:
1114
- uses: actions/checkout@v4
@@ -42,6 +45,18 @@ jobs:
4245
bun examples/oop.ts
4346
4447
- run: npm install
48+
49+
- name: Replace version in package.json
50+
run: |
51+
VERSION=${GITHUB_REF#refs/tags/}
52+
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/g" package.json
53+
4554
- run: npm publish --provenance --access public
4655
env:
4756
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57+
58+
- name: Push version changes to GitHub
59+
run: |
60+
git add .
61+
git commit -m "chore: update "
62+
git push

0 commit comments

Comments
 (0)