@@ -126,27 +126,16 @@ jobs:
126126 fail_ci_if_error : true
127127 token : ${{ secrets.CODECOV_TOKEN }}
128128
129- deploy :
130- name : Deploy
131- environment : release
132- # Run only on pushing a tag
129+ prepare-release-notes :
130+ name : Prepare Release Notes
133131 if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
134- needs : [lint, check]
135132 runs-on : ubuntu-latest
136133 steps :
137- - name : Install pandoc
138- run : |
139- sudo apt-get install -y pandoc
140134 - name : Checkout
141135 uses : actions/checkout@v4
142- - name : Download distributions
143- uses : actions/download-artifact@v4
144- with :
145- name : dist
146- path : dist
147- - name : Collected dists
136+ - name : Install pandoc
148137 run : |
149- tree dist
138+ sudo apt-get install -y pandoc
150139 - name : Extract release notes from Git tag
151140 run : |
152141 set -e
@@ -156,12 +145,39 @@ jobs:
156145 - name : Convert Release Notes to Markdown
157146 run : |
158147 pandoc -s -o release-notes.md release-notes.rst
148+ - name : Upload artifacts
149+ uses : actions/upload-artifact@v4
150+ with :
151+ name : release-notes.md
152+ path : release-notes.md
153+
154+ deploy :
155+ name : Deploy
156+ environment : release
157+ # Run only on pushing a tag
158+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
159+ needs : [lint, check, prepare-release-notes]
160+ runs-on : ubuntu-latest
161+ steps :
162+ - name : Download distributions
163+ uses : actions/download-artifact@v4
164+ with :
165+ name : dist
166+ path : dist
167+ - name : Collected dists
168+ run : |
169+ tree dist
159170 - name : PyPI upload
160171 uses : pypa/gh-action-pypi-publish@v1.12.4
161172 with :
162173 attestations : true
163174 packages-dir : dist
164175 password : ${{ secrets.PYPI_API_TOKEN }}
176+ - name : Download Release Notes
177+ uses : actions/download-artifact@v4
178+ with :
179+ name : release-notes.md
180+ path : release-notes.md
165181 - name : GitHub Release
166182 uses : ncipollo/release-action@v1
167183 with :
0 commit comments