Skip to content

Commit f26df9c

Browse files
committed
Update auto version
1 parent 9f3d52a commit f26df9c

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v3
1515

16-
- name: Update package.json
17-
run: |
18-
# Extract the version from the git tag (e.g., "v1.0.0")
19-
version=$(echo "${{ github.ref }}" | sed -e 's/^refs\/tags\/v//')
20-
21-
# Update the package.json version
22-
npm version "$version"
23-
2416
- name: Setup Node.js
2517
uses: actions/setup-node@v2
2618
with:
@@ -31,6 +23,14 @@ jobs:
3123
git config user.name '${{secrets.MAINTAINER_NAME}}'
3224
git config user.email '${{secrets.MAINTAINER_EMAIL}}'
3325
26+
- name: Update package.json
27+
run: |
28+
# Extract the version from the git tag (e.g., "v1.0.0")
29+
version=$(echo "${{ github.ref }}" | sed -e 's/^refs\/tags\/v//')
30+
31+
# Update the package.json version
32+
npm version "$version"
33+
3434
- uses: pnpm/action-setup@v2
3535
name: Install pnpm
3636
id: pnpm-install
@@ -58,6 +58,8 @@ jobs:
5858
- name: Build nextjs pages
5959
run: pnpm run build
6060

61+
62+
6163
- name: Publish
6264
run: |
6365
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}

0 commit comments

Comments
 (0)