Skip to content

Commit

Permalink
Merge pull request #1428 from ErikJiang/fix_latest_tag
Browse files Browse the repository at this point in the history
fix latest tag invaild in release action
  • Loading branch information
ErikJiang authored Dec 5, 2024
2 parents a9d754f + 816a14e commit 5d47eb6
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/call-gen-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
fetch-depth: 0
ref: main

- name: Extract latest tag
id: latest_tag
run: |
echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
- name: Create release notes markdown
run: |
# 1. get pre-release id
Expand All @@ -27,15 +32,15 @@ jobs:
-d '{"draft":false,"prerelease":false,"make_latest":"true"}'
# 3. generate release notes content for new release
latest_tag=${GITHUB_REF#refs/*/}
latest_tag=${{ steps.latest_tag.outputs.tag }}
curl \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${latest_tag} |yq '.body' > docs/overrides/releases/${latest_tag}.md
- name: Add support list in release notes markdown
run: |
latest_tag=${GITHUB_REF#refs/*/}
latest_tag=${{ steps.latest_tag.outputs.tag }}
bash ./hack/autoversion.sh ${latest_tag}
- name: Add support list in release body
Expand All @@ -44,9 +49,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body_path: docs/overrides/releases/${GITHUB_REF#refs/*/}.md


body_path: docs/overrides/releases/${{ steps.latest_tag.outputs.tag }}.md

- name: Push release notes
id: push_directory
Expand Down

0 comments on commit 5d47eb6

Please sign in to comment.