Skip to content

Commit

Permalink
Fix create-tag action
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 723286735
  • Loading branch information
santoso-wijaya authored and The Meridian Authors committed Feb 5, 2025
1 parent 752174b commit ec8a7c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/create-version-tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
uses: actions/github-script@v6
with:
script: |
const newTag = 'v${{ needs.check-version.outputs.new_version }}';
const newTag = 'v${{ inputs.new_version }}';
try {
await github.rest.git.createTag({
owner: context.repo.owner,
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ jobs:

create-tag:
needs: check-version
# Only run if new_version was discovered.
if: needs.check-version.outputs.new_version != ''
# Only run if new_version was discovered, and do this only on the main branch.
if: >
github.ref == 'refs/heads/main'
&& needs.check-version.outputs.new_version != ''
runs-on: ubuntu-latest
permissions:
contents: write # Allow to create tags
Expand Down

0 comments on commit ec8a7c5

Please sign in to comment.