File tree Expand file tree Collapse file tree 2 files changed +31
-17
lines changed Expand file tree Collapse file tree 2 files changed +31
-17
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,11 @@ name: Python package
22
33on :
44 push :
5- branches : [main, add-changelog ]
5+ branches : [main]
66 pull_request :
77 branches : [main]
88 release :
99 types : [published]
10- workflow_dispatch :
11- inputs :
12- branch :
13- description : ' Branch to run on'
14- required : true
15- default : ' main'
1610
1711jobs :
1812 format :
@@ -59,18 +53,10 @@ jobs:
5953
6054 changelog :
6155 name : Update changelog
62- if : github.event_name == 'release' && github.event.action == 'published' || github.event_name == 'workflow_dispatch'
56+ if : github.event_name == 'release' && github.event.action == 'published'
6357 runs-on : ubuntu-latest
6458 steps :
65- - name : Checkout branch for manual run
66- if : github.event_name == 'workflow_dispatch'
67- uses : actions/checkout@v4
68- with :
69- ref : ${{ github.event.inputs.branch }}
70- token : ${{ secrets.GITHUB_TOKEN }}
71-
72- - name : Checkout main branch for release
73- if : github.event_name == 'release'
59+ - name : Checkout main branch
7460 uses : actions/checkout@v4
7561 with :
7662 ref : main
Original file line number Diff line number Diff line change 1+ name : Test Changelog Update
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ branch :
7+ description : ' Branch to run on'
8+ required : true
9+ default : ' main'
10+
11+ jobs :
12+ test_changelog :
13+ name : Test Changelog Generation
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout specified branch
17+ uses : actions/checkout@v4
18+ with :
19+ ref : ${{ github.event.inputs.branch }}
20+
21+ - name : Run changelog-from-release for all releases
22+ uses : rhysd/changelog-from-release/action@v3
23+ with :
24+ file : CHANGELOG.md
25+ github_token : ${{ secrets.GITHUB_TOKEN }}
26+ args : " -l 6"
27+ commit : false
28+ push : false
You can’t perform that action at this time.
0 commit comments