Skip to content

Commit 9d4f2b4

Browse files
committed
npm version update
1 parent 43c23ff commit 9d4f2b4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/deploy_to_ghcr_tag_release.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,36 @@ on:
1111

1212
permissions:
1313
packages: write
14+
contents: write
1415

1516
jobs:
17+
version_update:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout GitHub Action
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: actions4git/setup-git@v1
26+
27+
- name: Update version in package.json
28+
id: version
29+
run: |
30+
git checkout -b temp-version-update
31+
version=$(npm version from-git --no-git-tag-version)
32+
cd api
33+
npm version from-git --no-git-tag-version
34+
git add package.json
35+
git commit --signoff --message $version
36+
git checkout main
37+
git merge temp-version-update
38+
git tag --force $version
39+
git push origin main -f --tags
40+
1641
push_to_ghcr:
1742
runs-on: ubuntu-latest
43+
needs: version_update
1844
steps:
1945
- name: Checkout GitHub Action
2046
uses: actions/checkout@v4
@@ -52,6 +78,7 @@ jobs:
5278

5379
push_proxy_to_ghcr:
5480
runs-on: ubuntu-latest
81+
needs: version_update
5582
steps:
5683
- name: Checkout GitHub Action
5784
uses: actions/checkout@v4

0 commit comments

Comments
 (0)