Skip to content

Commit

Permalink
ci: Use github.ref_name to get short tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmidyson committed Jun 29, 2023
1 parent 9a13f84 commit 5a7ac8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update released plugin version in plugin.yaml
run: yq -i -y '.version |= ("${{ github.ref }}" | sub("^v";""))' plugin.yaml
run: yq -i -y '.version |= ("${{ github.ref_name }}" | sub("^v";""))' plugin.yaml

# Use the REST API to update plugin.yaml, so we get automatic commit signing.
- name: Commit changes to plugin.yaml via REST API
Expand All @@ -42,7 +42,7 @@ jobs:
FILE_TO_COMMIT: plugin.yaml
DESTINATION_BRANCH: main
run: |
export MESSAGE="build: Update plugin.yaml to version ${{ github.ref }}"
export MESSAGE="build: Update plugin.yaml to version ${{ github.ref_name }}"
export SHA="$( git rev-parse ${DESTINATION_BRANCH}:${FILE_TO_COMMIT} )""
export CONTENT="$( base64 -i ${FILE_TO_COMMIT} )"
gh api --method PUT /repos/:owner/:repo/contents/${FILE_TO_COMMIT} \
Expand Down

0 comments on commit 5a7ac8f

Please sign in to comment.