forked from cjolowicz/cookiecutter-hypermodern-python
-
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.
Use Trusted Publisher for publishing to PyPI (#12)
* Add necessary permissions for GitHub Actions to work with repos which have workflow permission: "Read repository contents and package permissions". * Document how to create a PyPI project with a trusted publisher in quickstart.md.
- Loading branch information
1 parent
39de933
commit 8331172
Showing
5 changed files
with
43 additions
and
45 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
"author": "Contact Person", | ||
"email": "[email protected]", | ||
"github_organization": "statisticsnorway", | ||
"version": "0.1.0", | ||
"version": "0.0.0", | ||
"license": ["MIT", "Apache-2.0", "GPL-3.0"], | ||
"development_status": [ | ||
"Development Status :: 1 - Planning", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ jobs: | |
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
@@ -57,15 +60,12 @@ jobs: | |
- name: Publish package on PyPI | ||
if: steps.check-version.outputs.tag | ||
uses: pypa/[email protected] | ||
with: | ||
password: {{ "${{ secrets.PYPI_TOKEN }}" }} | ||
uses: pypa/[email protected] | ||
|
||
- name: Publish package on TestPyPI | ||
if: "! steps.check-version.outputs.tag" | ||
uses: pypa/[email protected].8 | ||
uses: pypa/[email protected].10 | ||
with: | ||
password: {{ "${{ secrets.TEST_PYPI_TOKEN }}" }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish the release notes | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.