File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ ---
2+ name : Tag Release
3+
4+ on :
5+ release :
6+ types : [created]
7+
8+ jobs :
9+ tag :
10+ runs-on : ubuntu-24.04
11+
12+ permissions :
13+ contents : write # Required for tag operation.
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+ with :
19+ fetch-depth : 0 # Fetch tag history.
20+ persist-credentials : false
21+
22+ - name : Tag release version
23+ env :
24+ GH_TOKEN : ${{ github.token }}
25+ GH_TAG : ${{ github.event.release.tag_name}}
26+ run : |
27+ version=${GH_TAG%%.*}
28+ gh api /repos/${{ github.repository }}/git/refs/tags/${version} --method PATCH --silent --field sha="${GITHUB_SHA}" --field force=true || \
29+ gh api /repos/${{ github.repository }}/git/refs --method POST --silent --field sha="${GITHUB_SHA}" --field ref="refs/tags/${version}"
File renamed without changes.
You can’t perform that action at this time.
0 commit comments