File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 steps :
1616 - name : Update notes
1717 run : |
18- NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ github.ref_name }} | jq -r '.body')
19- RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/tags/${{ github.ref_name }} | jq -r '.id')
20- gh api --method PATCH -H "Accept: application/vnd.github+json" "/repos/${{ github.repository }}/releases/$RELEASE_ID" -f "body=$NEW_NOTES"
18+ TAG="${{ github.ref_name }}"
19+ if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
20+ NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/generate-notes -f tag_name=${{ github.ref_name }} | jq -r '.body')
21+ RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/${{ github.repository }}/releases/tags/${{ github.ref_name }} | jq -r '.id')
22+ gh api --method PATCH -H "Accept: application/vnd.github+json" "/repos/${{ github.repository }}/releases/$RELEASE_ID" -f "body=$NEW_NOTES"
23+ fi
2124 env :
2225 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2326 RELEASE_TAG : ${{ github.event.release.tag_name }}
Original file line number Diff line number Diff line change 11name : Update Major Tag
22on :
33 workflow_dispatch :
4- push :
5- tags :
6- - ' v[0-9]+.[0-9]+.[0-9]+'
4+ release :
5+ types : [published]
76
87permissions :
98 contents : write
1615 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1716 - run : |
1817 TAG="${{ github.ref_name }}"
19- TAG="${TAG%%.*}"
20- git tag -f "${TAG}"
21- git push --tags --force
18+ if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
19+ TAG="${{ github.ref_name }}"
20+ TAG="${TAG%%.*}"
21+ git tag -f "${TAG}"
22+ git push --tags --force
23+ fi
You can’t perform that action at this time.
0 commit comments