diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index 6f328b5..b2f8491 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -21,6 +21,7 @@ jobs: - name: Bump version and push tag env: DEFAULT_BUMP: minor + PAT_TOKEN: ${{ secrets.PAT_TOKEN }} run: ./bump_version.sh - name: Create Release @@ -34,4 +35,4 @@ jobs: draft: false prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/bump_version.sh b/bump_version.sh index 542053f..6508ca8 100755 --- a/bump_version.sh +++ b/bump_version.sh @@ -35,6 +35,11 @@ esac NEW_VERSION="$MAJOR.$MINOR.$PATCH" +# Configure git to use the PAT +git config --global user.name "github-actions" +git config --global user.email "github-actions@github.com" +git remote set-url origin https://${PAT_TOKEN}@github.com/tawanda-kembo/code-collator.git + # Create a new tag git tag "v$NEW_VERSION" git push origin "v$NEW_VERSION" \ No newline at end of file