Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Commit 36f34a7

Browse files
committed
🔧. re-added version config - no push
1 parent 9b952ea commit 36f34a7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎.github/workflows/npm-publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v2
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
1921

2022
- name: Set version for release trigger
2123
uses: allenevans/set-env@v2.0.1
@@ -38,6 +40,22 @@ jobs:
3840
- name: Install
3941
run: npm install
4042

43+
- name: Setup GIT user
44+
run: |
45+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
46+
git config user.name "$GITHUB_ACTOR"
47+
48+
- name: Bump version for release trigger
49+
if: ${{ github.event_name == 'release' }}
50+
run: |
51+
npm --no-git-tag-version version ${{env.PACKAGE_VERSION}}
52+
git add .
53+
git commit -m ${{env.PACKAGE_VERSION}}
54+
55+
- name: Bump version for workflow dispatch
56+
if: ${{ github.event_name == 'workflow_dispatch' }}
57+
run: npm version ${{env.PACKAGE_VERSION}}
58+
4159
- name: Publish
4260
run: npm publish --access public
4361
env:

0 commit comments

Comments
 (0)