6
6
- ' *'
7
7
permissions :
8
8
contents : write
9
-
10
9
id-token : write
11
-
12
- jobs :
13
- changelog :
14
- name : Create release as draft with changelog
10
+ jobs :
11
+ changelog :
12
+ name : Generate changelog
13
+ runs-on : ubuntu-latest
14
+ outputs :
15
+ release_body : ${{ steps.git-cliff.outputs.content }}
16
+ steps :
17
+ - uses : actions/checkout@v4
18
+ with :
19
+ fetch-depth : 0
20
+ - name : Generate a changelog
21
+ id : git-cliff
22
+ uses : orhun/git-cliff-action@v4
23
+ with :
24
+ config : .github/cliff.toml
25
+ args : -vv --current
26
+ env :
27
+ OUTPUT : CHANGELOG.md
28
+ GITHUB_REPO : ${{ github.repository }}
29
+ create_draft_release :
30
+ name : Create release as draft
15
31
runs-on : ubuntu-latest
16
- steps :
17
- - uses : actions/checkout@v4
18
- with :
19
- fetch-depth : 0
20
- - name : Generate a changelog
21
- uses : orhun/git-cliff-action@v4
22
- with :
23
- config : .github/cliff.toml
24
- args : --current
25
- env :
26
- OUTPUT : CHANGELOG.md
27
- GITHUB_REPO : ${{ github.repository }}
28
- - name : Create release
29
- run : gh release create ${{ github.ref_name }} -F CHANGELOG.md --draft
30
- env :
31
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+ needs : [changelog]
33
+ - name : Create release as draft
34
+ run : gh release create ${{ github.ref_name }} -F ${{ needs.changelog.outputs.release_body }}--draft
35
+ env :
36
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
+
32
38
33
39
package :
34
40
name : Package
@@ -49,11 +55,10 @@ jobs:
49
55
uv build
50
56
- name : Publish package distributions to PyPI
51
57
uses : pypa/gh-action-pypi-publish@release/v1
52
-
53
- publish :
58
+ publish_release :
54
59
name : Publish release
55
60
runs-on : ubuntu-latest
56
- needs : [changelog, package]
61
+ needs : [create_draft_release, changelog, package]
57
62
steps :
58
63
- name : Checkout
59
64
uses : actions/checkout@v4
0 commit comments