|
54 | 54 | echo "Release tag is $TAG_VERSION" |
55 | 55 | npm version $TAG_VERSION --no-git-tag-version |
56 | 56 |
|
57 | | - - name: Commit version updates |
58 | | - working-directory: openrewrite |
59 | | - run: | |
60 | | - git config --global user.name "github-actions[bot]" |
61 | | - git config --global user.email "github-actions[bot]@users.noreply.github.com" |
62 | | - git add package.json package-lock.json |
63 | | - git commit -m "bump version ${GITHUB_REF#refs/tags/}" |
64 | | - git push https://${GH_TOKEN}@github.com/openrewrite/rewrite-javascript.git HEAD:main |
65 | | - env: |
66 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
67 | | - |
68 | 57 | - name: publish-npm |
69 | 58 | working-directory: openrewrite |
70 | 59 | run: | |
@@ -109,3 +98,21 @@ jobs: |
109 | 98 | final \ |
110 | 99 | publish \ |
111 | 100 | closeAndReleaseSonatypeStagingRepository |
| 101 | +
|
| 102 | + - name: Update package.json version from tag |
| 103 | + working-directory: openrewrite |
| 104 | + run: | |
| 105 | + TAG_VERSION=${GITHUB_REF#refs/tags/} |
| 106 | + echo "Release tag is $TAG_VERSION" |
| 107 | + npm version $TAG_VERSION --no-git-tag-version |
| 108 | +
|
| 109 | + - name: Commit version updates |
| 110 | + working-directory: openrewrite |
| 111 | + run: | |
| 112 | + git config --global user.name "github-actions[bot]" |
| 113 | + git config --global user.email "github-actions[bot]@users.noreply.github.com" |
| 114 | + git add package.json package-lock.json |
| 115 | + git commit -m "bump version ${GITHUB_REF#refs/tags/}" |
| 116 | + git push https://${GH_TOKEN}@github.com/openrewrite/rewrite-javascript.git HEAD:main |
| 117 | + env: |
| 118 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments