Skip to content

Commit

Permalink
Merge pull request #8 from tawanda-kembo/feat/automate-versioning
Browse files Browse the repository at this point in the history
Feat/automate versioning
  • Loading branch information
tawandakembo authored Jul 27, 2024
2 parents 5115798 + 986fddb commit 2fe4870
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Bump version and push tag
env:
DEFAULT_BUMP: minor
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: ./bump_version.sh

- name: Create Release
Expand All @@ -41,4 +41,4 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
8 changes: 1 addition & 7 deletions bump_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,4 @@ git remote set-url origin "https://${GITHUB_TOKEN}@github.com/tawanda-kembo/code
git tag "v$NEW_VERSION"

# Push the tag using the GITHUB_TOKEN
GIT_ASKPASS=$(mktemp)
echo "echo \$GITHUB_TOKEN" > $GIT_ASKPASS
chmod +x $GIT_ASKPASS
GIT_ASKPASS=$GIT_ASKPASS git push origin "v$NEW_VERSION"

# Clean up
rm $GIT_ASKPASS
git push origin "v$NEW_VERSION"

0 comments on commit 2fe4870

Please sign in to comment.