Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update GitHub Actions workflow to use PAT #3

Merged
merged 1 commit into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,4 +35,4 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
5 changes: 5 additions & 0 deletions bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
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"
Loading