diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml index 4f7fc45..0776858 100644 --- a/.github/workflows/maven-release.yml +++ b/.github/workflows/maven-release.yml @@ -96,4 +96,12 @@ jobs: INPUTS_RELEASE_COMMAND: ${{ inputs.release_command }} - name: Push all the git commits and tags back to the repository - run: git push && git push --tags + run: | + # Construct the authenticated URL + # format: https://@github.com//.git + REMOTE="https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" + + git push "${REMOTE}" && git push "${REMOTE}" --tags + env: + # Use the standard GITHUB_TOKEN or a Custom PAT if pushing to other repos + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/maven-set-version.yml b/.github/workflows/maven-set-version.yml index 651bb86..e59d60d 100644 --- a/.github/workflows/maven-set-version.yml +++ b/.github/workflows/maven-set-version.yml @@ -75,8 +75,14 @@ jobs: - name: Push all the git commits and tags back to the repository run: | + # Construct the authenticated URL + # format: https://@github.com//.git + REMOTE="https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" + git add -A git commit -m "chore: Bump version to: ${INPUTS_NEW_VERSION}" - git push + git push "${REMOTE}" env: INPUTS_NEW_VERSION: ${{ inputs.new_version }} + # Use the standard GITHUB_TOKEN or a Custom PAT if pushing to other repos + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}