File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 55 types : [published]
66
77permissions :
8- contents : write # Allow pushing changes to the repository
8+ contents : write
99
1010jobs :
1111 release :
1616 - name : Checkout code
1717 uses : actions/checkout@v3
1818
19- # Step 2: Set up Node.js without caching
19+ # Step 2: Set up Node.js
2020 - name : Set up Node.js
2121 uses : actions/setup-node@v3
2222 with :
@@ -26,20 +26,21 @@ jobs:
2626 - name : Clear npm cache
2727 run : npm cache clean --force
2828
29- # Step 4: Install dependencies (without lock file)
29+ # Step 4: Install dependencies
3030 - name : Install dependencies
3131 run : npm install --no-package-lock
3232
3333 # Step 5: Sync package.json version with release tag
3434 - name : Sync version with release tag
3535 run : |
3636 RELEASE_VERSION=${GITHUB_REF#refs/tags/}
37- echo "Updating package.json to version ${RELEASE_VERSION}"
38- npm version ${RELEASE_VERSION} --no-git-tag-version
37+ echo "Updating package.json to match release version ${RELEASE_VERSION}"
38+ jq ".version = \"${RELEASE_VERSION}\"" package.json > temp.json && mv temp.json package.json
39+ cat package.json # Debugging output to ensure version is updated
3940
4041 # Step 6: Generate/update changelog
4142 - name : Update changelog
42- run : npx standard-version --skip.tag --skip.commit
43+ run : npx standard-version --skip.bump --skip. tag --skip.commit
4344
4445 # Step 7: Authenticate with npm
4546 - name : Authenticate with npm
You can’t perform that action at this time.
0 commit comments