1- name : Publish Release
2-
3- on :
4- push :
5- tags :
6- - ' *'
7- # branches: [main]
8- # schedule:
9- # 定时任务,每天 UTC 时间 0 点运行
10- # - cron: "0 0 * * *"
11- # workflow_dispatch:
12- permissions : # Global permissions configuration starts here
13- contents : read # 'read' access to repository contents
14- pull-requests : write # 'write' access to pull requests
15-
16- jobs :
17- tags :
18- runs-on : ubuntu-latest
19-
20- permissions :
21- contents : write
22- steps :
23- - name : Checkout code
24- uses : actions/checkout@v4
25- with :
26- fetch-depth : 0 # 为了 git pull --unshallow,我们需要获取所有的提交历史
27-
28- - name : Set up Git user
29- run : |
30- git config --global user.email "[email protected] " 31- git config --global user.name "AlianBlank"
32-
33- - name : " ✏️ Generate release changelog"
34- uses :
heinrichreimer/[email protected] 35- with :
36- token : ${{ secrets.GITHUB_TOKEN }}
37-
38- - name : Commit CHANGELOG.md
39- run : |
40- git add CHANGELOG.md
41- git commit -m "[修改]1.修改更新日志"
42-
43- - name : change-version-by-tag
44- uses :
AlianBlank/[email protected] 45- with :
46- version : ${{ github.ref_name }}
47-
48- - name : Push changes
49- uses : ad-m/github-push-action@master
50- with :
51- branch : ${{ github.head_ref }}
1+ name : Publish Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+ # branches: [main]
8+ # schedule:
9+ # 定时任务,每天 UTC 时间 0 点运行
10+ # - cron: "0 0 * * *"
11+
12+ # workflow_dispatch:
13+ permissions : # Global permissions configuration starts here
14+ contents : read # 'read' access to repository contents
15+ pull-requests : write # 'write' access to pull requests
16+
17+ jobs :
18+ tags :
19+ runs-on : ubuntu-latest
20+
21+ permissions :
22+ contents : write
23+ steps :
24+ - name : Checkout code
25+ uses : actions/checkout@v4
26+ with :
27+ fetch-depth : 0 # 为了 git pull --unshallow,我们需要获取所有的提交历史
28+
29+ - name : Set up Git user
30+ run : |
31+ git config --global user.email "[email protected] " 32+ git config --global user.name "AlianBlank"
33+
34+ - name : " ✏️ Generate release changelog"
35+ uses :
heinrichreimer/[email protected] 36+ with :
37+ token : ${{ secrets.GITHUB_TOKEN }}
38+
39+ - name : Commit CHANGELOG.md
40+ run : |
41+ git add CHANGELOG.md
42+ git commit -m "[修改]1.修改更新日志"
43+
44+ - name : change-version-by-tag
45+ uses :
AlianBlank/[email protected] 46+ with :
47+ version : ${{ github.ref_name }}
48+
49+ - name : Push changes
50+ uses : ad-m/github-push-action@master
51+ with :
52+ force : true
53+ tags : true
0 commit comments