File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Requires repository secret RELEASE_TOKEN (fine-grained PAT: Contents read/write on this repo).
2+ # See CONTRIBUTING.md — "Personal access token for releases".
3+
4+ name : Release
5+
6+ run-name : Release v${{ github.event.inputs.version }}
7+
8+ on :
9+ workflow_dispatch :
10+ inputs :
11+ version :
12+ description : " Release version (e.g. 1.2.0), no v prefix"
13+ required : true
14+ type : string
15+
16+ permissions :
17+ contents : write
18+
19+ jobs :
20+ release :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Checkout develop
24+ uses : actions/checkout@v4
25+ with :
26+ ref : develop
27+ fetch-depth : 0
28+ token : ${{ secrets.RELEASE_TOKEN }}
29+
30+ - name : Configure Git
31+ run : |
32+ git config user.name "github-actions[bot]"
33+ git config user.email "github-actions[bot]@users.noreply.github.com"
34+
35+ - name : Install yq
36+ run : |
37+ sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
38+ sudo chmod +x /usr/local/bin/yq
39+
40+ - name : Run release script
41+ run : ./release.sh "${{ github.event.inputs.version }}"
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.RELEASE_TOKEN }}
44+
45+ - name : Create GitHub Release
46+ uses : softprops/action-gh-release@v2
47+ with :
48+ tag_name : ${{ github.event.inputs.version }}
49+ name : Release v${{ github.event.inputs.version }}
50+ body : |
51+ Release v${{ github.event.inputs.version }}
52+
53+ See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ github.event.inputs.version }}/CHANGELOG.md) for details.
You can’t perform that action at this time.
0 commit comments