Skip to content

Commit

Permalink
fix release github action
Browse files Browse the repository at this point in the history
Signed-off-by: Xudong Liu <[email protected]>
  • Loading branch information
XudongLiuHarold committed Jun 14, 2024
1 parent d76ab69 commit 9496ffe
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/generate-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jobs:
run: |
git fetch --tags --force
latest_tag=$(git tag --sort=-creatordate | head -n 1)
echo "latest release is ${latest_tag}"
echo "latest_tag=${latest_tag}" >> $GITHUB_OUTPUT
echo "valid=$(./hack/match-release-tag.sh ${latest_tag} >/dev/null 2>&1)" >> $GITHUB_OUTPUT
valid=$(./hack/match-release-tag.sh ${latest_tag} >/dev/null 2>&1)
echo "valid release: ${valid}" >> $GITHUB_OUTPUT
echo "valid=${valid}" >> $GITHUB_OUTPUT
- name: Find Second Latest Release Tag
if: ${{ steps.check.outputs.valid }}
Expand All @@ -63,13 +66,13 @@ jobs:
echo "second_latest_release_tag=${second_latest_release_tag}" >> $GITHUB_OUTPUT
- name: Generate Release Note
if: ${{ steps.check.outputs.valid }}
run: |
if ${{ steps.find.outputs.pre_release}} >/dev/null 2>&1; then
gh release create ${{ steps.check.outputs.latest_tag }} --verify-tag --generate-notes --notes-start-tag ${{ steps.find.outputs.second_latest_release_tag }} --prerelease
else
gh release create ${{ steps.check.outputs.latest_tag }} --verify-tag --generate-notes --notes-start-tag ${{ steps.find.outputs.second_latest_release_tag }}
fi
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# - name: Generate Release Note
# if: ${{ steps.check.outputs.valid }}
# run: |
# if ${{ steps.find.outputs.pre_release}} >/dev/null 2>&1; then
# gh release create ${{ steps.check.outputs.latest_tag }} --verify-tag --generate-notes --notes-start-tag ${{ steps.find.outputs.second_latest_release_tag }} --prerelease
# else
# gh release create ${{ steps.check.outputs.latest_tag }} --verify-tag --generate-notes --notes-start-tag ${{ steps.find.outputs.second_latest_release_tag }}
# fi
# env:
# GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 9496ffe

Please sign in to comment.