-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use trusted publisher to publish to PyPI
- Loading branch information
1 parent
2a9049c
commit 7360c6c
Showing
3 changed files
with
12 additions
and
10 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
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 |
---|---|---|
|
@@ -65,13 +65,18 @@ jobs: | |
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
environment: release | ||
needs: | ||
- test | ||
- lint | ||
- commitlint | ||
|
||
runs-on: ubuntu-latest | ||
environment: release | ||
concurrency: release | ||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -80,14 +85,14 @@ jobs: | |
|
||
# Do a dry run of PSR | ||
- name: Test release | ||
uses: relekang/[email protected] | ||
uses: python-semantic-release/[email protected] | ||
if: github.ref_name != 'main' | ||
with: | ||
root_options: --noop | ||
|
||
# On main branch: actual PSR + upload to PyPI & GitHub | ||
- name: Release | ||
uses: relekang/[email protected] | ||
uses: python-semantic-release/[email protected] | ||
id: release | ||
if: github.ref_name == 'main' | ||
with: | ||
|
@@ -96,8 +101,6 @@ jobs: | |
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: steps.release.outputs.released == 'true' | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Publish package distributions to GitHub Releases | ||
uses: python-semantic-release/upload-to-gh-release@main | ||
|