File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 3434 ${{ runner.os }}-bun-
3535
3636 - name : Install dependencies
37- run : bun install
37+ run : bun install --frozen-lockfile
3838
3939 - name : Compile the assets
4040 run : bun compile
@@ -44,19 +44,17 @@ jobs:
4444 bun examples/basic.ts
4545 bun examples/oop.ts
4646
47- - name : Replace version in package.json
48- run : |
49- VERSION=${GITHUB_REF#refs/tags/}
50- sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/g" package.json
47+ - id : current-version
48+ name : Get current version
49+ run : echo "CURRENT_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_OUTPUT
5150
52- - run : bun publish --provenance --access public
51+ - name : Set package version
52+ run : bunx npm version --no-git-tag-version $CURRENT_VERSION
5353 env :
54- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
54+ CURRENT_VERSION : ${{ steps.current-version.outputs.CURRENT_VERSION }}
5555
56- - name : Push version changes to GitHub
57- run : |
58- git config --global user.email "github-actions[bot]@users.noreply.github.com"
59- git config --global user.name "github-actions[bot]"
60- git add .
61- git commit -m "chore: update "
62- git push origin main
56+ - run : |
57+ echo "//registry.npmjs.org/:_authToken=$AUTH_TOKEN" >> .npmrc
58+ bun publish --provenance --access=public
59+ env:
60+ AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments