File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : 🚀 Do tag.
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ branch :
6+ description : ' Branch name (e.g. release/3.3.0)'
7+ required : true
8+ tag :
9+ description : ' Tag name (e.g., v3.3.1)'
10+ required : true
11+
12+ jobs :
13+ do-tag :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v6
18+ with :
19+ token : ${{ secrets.REPO_ACCESS_TOKEN }}
20+
21+ - name : Switch to the branch and create a tag
22+ run : |
23+ git config user.name "github-actions"
24+ git config user.email "github-actions@github.com"
25+ git fetch origin "${{ github.event.inputs.branch }}"
26+ git fetch -p -P -t -f
27+ git checkout "${{ github.event.inputs.branch }}"
28+ git tag "${{ github.event.inputs.tag }}"
29+ git push origin "${{ github.event.inputs.tag }}"
You can’t perform that action at this time.
0 commit comments