Skip to content

Commit

Permalink
chore: fix missing tag_name input for create-release action
Browse files Browse the repository at this point in the history
  • Loading branch information
tawandakembo committed Jul 27, 2024
1 parent 8db009e commit 1a839ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
DEFAULT_BUMP: minor
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
echo "Token length: ${#GITHUB_TOKEN}"
./bump_version.sh
echo "Token length: ${#GITHUB_TOKEN}"
./bump_version.sh
- name: Create Release
if: success()
uses: actions/create-release@v1
with:
tag_name: ${{ steps.tag.outputs.new_tag }}
release_name: Release ${{ steps.tag.outputs.new_tag }}
tag_name: v${{ steps.bump_version.outputs.NEW_VERSION }}
release_name: Release v${{ steps.bump_version.outputs.NEW_VERSION }}
body: |
See [CHANGELOG](https://github.com/tawanda-kembo/code-collator/blob/main/CHANGELOG.md) for details.
draft: false
Expand Down
10 changes: 4 additions & 6 deletions bump_version.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/bin/bash
set -e

echo "Token length: ${#GITHUB_TOKEN}"
echo "Remote URL before: $(git remote get-url origin)"
git remote set-url origin "https://${GITHUB_TOKEN}@github.com/tawanda-kembo/code-collator.git"
echo "Remote URL after: $(git remote get-url origin)"

# Default bump type
DEFAULT_BUMP=${DEFAULT_BUMP:-minor}

Expand Down Expand Up @@ -51,4 +46,7 @@ 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 push origin "v$NEW_VERSION"
git push origin "v$NEW_VERSION"

# Set the output variable for the new version
echo "::set-output name=NEW_VERSION::v$NEW_VERSION"

0 comments on commit 1a839ae

Please sign in to comment.