From 110fb53961b2f995bc9c558505f08cd6c703059d Mon Sep 17 00:00:00 2001 From: Oleh Dokuka Date: Wed, 18 Dec 2024 20:35:59 +0200 Subject: [PATCH] fix CI --- .github/workflows/publish.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fd6f4c0f..efd60ca0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -54,17 +54,6 @@ jobs: echo "Release tag is $TAG_VERSION" npm version $TAG_VERSION --no-git-tag-version - - name: Commit version updates - working-directory: openrewrite - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git add package.json package-lock.json - git commit -m "bump version ${GITHUB_REF#refs/tags/}" - git push https://${GH_TOKEN}@github.com/openrewrite/rewrite-javascript.git HEAD:main - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: publish-npm working-directory: openrewrite run: | @@ -109,3 +98,21 @@ jobs: final \ publish \ closeAndReleaseSonatypeStagingRepository + + - name: Update package.json version from tag + working-directory: openrewrite + run: | + TAG_VERSION=${GITHUB_REF#refs/tags/} + echo "Release tag is $TAG_VERSION" + npm version $TAG_VERSION --no-git-tag-version + + - name: Commit version updates + working-directory: openrewrite + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git add package.json package-lock.json + git commit -m "bump version ${GITHUB_REF#refs/tags/}" + git push https://${GH_TOKEN}@github.com/openrewrite/rewrite-javascript.git HEAD:main + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}