File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Release
3+
4+ on :
5+ release :
6+ types : [published]
7+
8+ jobs :
9+ Release :
10+ runs-on : [ubuntu-24.04]
11+
12+ permissions :
13+ contents : write # Required to checkout repository.
14+ id-token : write # Required for authentication.
15+ packages : write # Required to publish packages.
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+ with :
21+ fetch-tags : true
22+ persist-credentials : false
23+
24+ - name : Tag release
25+ env :
26+ GH_TAG : ${{ github.event.release.tag_name}}
27+ GH_TOKEN : ${{ github.token }}
28+ run : |
29+ version=${GH_TAG%%.*}
30+ gh api /repos/${{ github.repository }}/git/refs/tags/${version} --method PATCH --silent --field sha="${GITHUB_SHA}" --field force=true || \
31+ gh api /repos/${{ github.repository }}/git/refs --method POST --silent --field sha="${GITHUB_SHA}" --field ref="refs/tags/${version}"
32+
33+ - name : Publish package
34+ uses : actions/publish-immutable-action@4bc8754ffc40f27910afb20287dbbbb675a4e978 # v0.0.4
You can’t perform that action at this time.
0 commit comments