-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use pypi trusted publisher (#133)
Signed-off-by: Henry Schreiner <[email protected]>
- Loading branch information
Showing
3 changed files
with
30 additions
and
14 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 |
---|---|---|
|
@@ -84,9 +84,9 @@ jobs: | |
{%- if not compiled %} | ||
|
||
dist: | ||
needs: [pre-commit] | ||
name: Distribution build | ||
runs-on: ubuntu-latest | ||
needs: [pre-commit] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -107,12 +107,26 @@ jobs: | |
|
||
{%- endif %} | ||
|
||
- uses: pypa/[email protected] | ||
publish: | ||
needs: [dist] | ||
name: Publish to PyPI | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
with: | ||
# Remember to generate this and set it in "GitHub Secrets" | ||
password: {% raw %}${{ secrets.pypi_password }}{% endraw %} | ||
# Remove this line | ||
# Remember to tell (test-)pypi about this repo before publishing | ||
# Remove this line to publish to PyPI | ||
repository-url: https://test.pypi.org/legacy/ | ||
{%- if cookiecutter.project_type == "trampolim" %} | ||
# Check not supported currently by twine + trampolim | ||
|
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