-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow the PyPI publishing workflows to be used as reusable workf…
…lows by requiring a token for uploading the package (#26) * fix: Allow the PyPI publishing workflows to be used as reusable workflows by requiring a token for uploading the package. * docs: Update changelog
- Loading branch information
Showing
5 changed files
with
41 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,14 @@ on: | |
description: The public SSH key linked to the `secrets.ssh-signing-key-private` | ||
key that will be used to sign the commit and tag created by `python-semantic-release`. | ||
required: true | ||
pypi-api-token: | ||
description: The API token for the package on pypi.org. If `build-and-publish-python-package` | ||
is set to `true`, this input must be provided or the build will fail. | ||
required: false | ||
test-pypi-api-token: | ||
description: The API token for the package on test.pypi.org. If `build-and-publish-python-package` | ||
is set to `true`, this input must be provided or the build will fail. | ||
required: false | ||
concurrency: | ||
group: pypi (Reusable Workflows) | ||
env: | ||
|
@@ -181,6 +189,7 @@ jobs: | |
- name: Upload package to Test PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.test-pypi-api-token }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
# Upload the official package version to PyPI | ||
upload-pypi: | ||
|
@@ -200,6 +209,8 @@ jobs: | |
path: dist | ||
- name: Upload package to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.pypi-api-token }} | ||
# Upload the official package binaries to the GitHub Release | ||
upload-github: | ||
name: Upload package to GitHub Release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ on: | |
format `owner/repo`. | ||
required: true | ||
type: string | ||
secrets: | ||
test-pypi-api-token: | ||
description: The API token for the package on test.pypi.org. | ||
required: true | ||
concurrency: | ||
group: pypi (Reusable Workflows) | ||
env: | ||
|
@@ -54,6 +58,7 @@ jobs: | |
- name: Upload package to Test PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
password: ${{ secrets.test-pypi-api-token }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
test-pypi-install: | ||
name: Install package from test.pypi.org | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters