File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,17 @@ jobs:
1919 git config user.name "${GITHUB_ACTOR}"
2020 git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
2121 - run : echo "NPM_PACKAGE_VERSION=$(npm version patch --no-git-tag-version)" | tee -a $GITHUB_ENV
22+ - run : echo "NPM_PACKAGE_VERSION_MAJOR=$(echo "${{ env.NPM_PACKAGE_VERSION }}" | cut -d. -f1)" | tee -a $GITHUB_ENV
2223 - run : git add package.json package-lock.json
23- - name : Update README.md with new version
24- run : |
24+ - run : |
2525 sed -i "s|\(uses: forproxyband/vector-code-map@\)v[0-9.]*|\1${{ env.NPM_PACKAGE_VERSION }}|g" README.md
2626 - run : git add README.md
2727 - run : |
2828 git commit -m "Set version ${{ env.NPM_PACKAGE_VERSION }} by ${GITHUB_ACTOR}"
2929 git push -u origin main
30- git tag -a ${{ env.NPM_PACKAGE_VERSION }} -m "Add tag ${{ env.NPM_PACKAGE_VERSION }}"
30+ git tag -a ${{ env.NPM_PACKAGE_VERSION_MAJOR }} -m "Add major tag ${{ env.NPM_PACKAGE_VERSION_MAJOR }}"
31+ git push origin ${{ env.NPM_PACKAGE_VERSION_MAJOR }}
32+ git tag -fa ${{ env.NPM_PACKAGE_VERSION }} -m "Add tag ${{ env.NPM_PACKAGE_VERSION }}"
3133 git push origin ${{ env.NPM_PACKAGE_VERSION }}
3234 env:
3335 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments