Skip to content

Commit

Permalink
Release/Tag Workflow followup fixes
Browse files Browse the repository at this point in the history
Signed-off-by: egibs <[email protected]>
  • Loading branch information
egibs committed Jun 9, 2024
1 parent 9155f89 commit 3053dc4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,20 @@ jobs:
- name: Get Version
id: get-version
run: |
CURRENT_VERSION=$(awk -F'"' '/ID string =/ {print $2}' ${{ env.VERSION_FILE }})
echo "VERSION=$CURRENT_VERSION" >> "$GITHUB_OUTPUT"
VERSION=$(awk -F'"' '/ID string =/ {print $2}' ${{ env.VERSION_FILE }})
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Create Tag
if: ${{ steps.get-version.outputs.VERSION != '' }}
run: |
if [ $(git tag -l "${{ steps.get-version.outputs.VERSION }}") ]; then
echo "Tag already exists for version $CURRENT_VERSION"
VERSION=${{ steps.get-version.outputs.VERSION }}
if [ $(git tag -l "$VERSION") ]; then
echo "Tag already exists for version $VERSION"
exit 0
else
git config --global tag.gpgsign true
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag $CURRENT_VERSION
git push origin tag $CURRENT_VERSION
git tag $VERSION
git push origin tag $VERSION
gitsign verify $(git rev-list --tags --max-count=1) --certificate-identity-regexp="https://github.com/${{ github.repository }}" --certificate-oidc-issuer="https://token.actions.githubusercontent.com"
fi

0 comments on commit 3053dc4

Please sign in to comment.