Skip to content

Commit aec0b6e

Browse files
committed
ci: update release version bump
1 parent 2eb50ae commit aec0b6e

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,23 @@ jobs:
1616
registry-url: https://registry.npmjs.org/
1717
- run: npm ci
1818
- run: npm run build
19-
- name: Semantic Release (main)
19+
- name: Version bump
20+
if: success()
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
npm version patch --no-git-tag-version
25+
echo "NEW_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
26+
27+
- name: Publish to npm
28+
if: success()
2029
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
23-
run: npx semantic-release
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31+
run: npm publish
32+
33+
- name: Commit & push version bump
34+
if: success()
35+
run: |
36+
git add package.json package-lock.json
37+
git commit -m "ci: bump to $NEW_VERSION"
38+
git push origin dev

0 commit comments

Comments
 (0)