Skip to content

Commit 9e818a0

Browse files
authored
Merge pull request #122 from radiovisual/update-publish-workflow
ci: update publish workflow
2 parents 63186b5 + 4e3b0c4 commit 9e818a0

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,35 @@ jobs:
99
- uses: actions/checkout@v4
1010
- uses: actions/setup-node@v4
1111
with:
12-
node-version: '20.x'
13-
registry-url: 'https://registry.npmjs.org'
12+
node-version: "20.x"
13+
registry-url: "https://registry.npmjs.org"
1414
- run: git config --global user.email "wuergler@gmail.com"
1515
- run: git config --global user.name "Michael Wuergler"
1616
- run: npm ci
1717
- name: Extract version from tag
1818
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
19-
- run: npm version ${{ env.RELEASE_VERSION }}
19+
- run: npm version ${{ env.RELEASE_VERSION }} --no-git-tag-version
2020
- run: npm run build
2121
- run: npm publish
2222
env:
2323
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24+
- name: Commit and push version bump
25+
run: |
26+
git add package.json
27+
git commit -m "chore: bump version to ${{ env.RELEASE_VERSION }}"
28+
git push origin HEAD:${{ env.GITHUB_REF#refs/tags/ }}
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2431

2532
# This step will only run if all previous steps have succeeded
2633
- name: Create Pull Request for Version Bump
2734
if: success()
2835
uses: peter-evans/create-pull-request@v6
2936
with:
30-
commit-message: Update package version
31-
title: 'chore: update package version to ${{ env.RELEASE_VERSION }}'
32-
body: 'Updates `package.json` version to `${{ env.RELEASE_VERSION }}`.'
37+
commit-message: Update package version to ${{ env.RELEASE_VERSION }}
38+
title: "chore: update package version to ${{ env.RELEASE_VERSION }}"
39+
body: "Updates `package.json` version to `${{ env.RELEASE_VERSION }}`."
3340
branch: version-bump/${{ env.RELEASE_VERSION }}
3441
labels: version-bump
3542
token: ${{ secrets.GITHUB_TOKEN }}
3643
base: master
37-

0 commit comments

Comments
 (0)