Skip to content

Commit d14e4e6

Browse files
committed
Add step to create empty GH Release before upload
1 parent 944431d commit d14e4e6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

source/guides/github-actions-ci-cd-sample/publish-to-test-pypi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
inputs: >-
7474
./dist/*.tar.gz
7575
./dist/*.whl
76+
- name: Create GitHub Release
77+
run: >-
78+
gh release create
79+
'${{ github.ref_name }}'
80+
--notes ""
7681
- name: Upload artifact signatures to GitHub Release
7782
env:
7883
GITHUB_TOKEN: ${{ github.token }}

source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,13 @@ Signing the distribution packages
163163
The following job signs the distribution packages with `Sigstore`_,
164164
the same artifact signing system `used to sign CPython <https://www.python.org/download/sigstore/>`_.
165165

166-
It uses the `sigstore/gh-action-sigstore-python GitHub Action`_,
167-
and then uploads them to a GitHub Release.
166+
Firstly, it uses the `sigstore/gh-action-sigstore-python GitHub Action`_
167+
to sign the distribution packages. In the next step, an empty GitHub Release
168+
from the current tag is created using the ``gh`` CLI. Note this step can be further
169+
customised. See the `gh release documentation <https://cli.github.com/manual/gh_release>`_
170+
as a reference.
171+
172+
Finally, the signed distributions are uploaded to the GitHub Release.
168173

169174
.. literalinclude:: github-actions-ci-cd-sample/publish-to-test-pypi.yml
170175
:language: yaml

0 commit comments

Comments
 (0)