-
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.
adding trusted-publishers publishing on pypi
- Loading branch information
Showing
1 changed file
with
7 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 |
---|---|---|
|
@@ -5,11 +5,17 @@ on: | |
branches: | ||
- main | ||
- master | ||
- trusted-publishers | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/merge-stardist-masks | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
@@ -58,17 +64,12 @@ jobs: | |
- name: Publish package on PyPI | ||
if: steps.check-version.outputs.tag | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- name: Publish package on TestPyPI | ||
if: "! steps.check-version.outputs.tag" | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish the release notes | ||
uses: release-drafter/[email protected] | ||
|