-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3759fb6
commit f73ef36
Showing
1 changed file
with
33 additions
and
19 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 |
---|---|---|
|
@@ -36,38 +36,52 @@ jobs: | |
shell: 'bash' | ||
run: python -m build --sdist --wheel . | ||
|
||
- uses: actions/upload-artifact@v3.1.2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist/* | ||
|
||
publish_testpypi: | ||
needs: [ build_artifacts ] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
if: ${{ inputs.test }} | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish package distributions to TEST PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
name: testpypi | ||
user: ${{ secrets.PYPI_USERNAME_SPACEKIT_MAINTAINER }} | ||
password: ${{ secrets.PYPI_PASSWORD_SPACEKIT_MAINTAINER_TEST }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
verify-metadata: true | ||
skip-existing: false | ||
verbose: true | ||
|
||
publish_pypi: | ||
needs: [ build_artifacts ] | ||
runs-on: ubuntu-latest | ||
env: | ||
name: pypi | ||
url: https://pypi.org/project/spacekit | ||
user: ${{ secrets.PYPI_USERNAME_SPACEKIT_MAINTAINER }} | ||
password: ${{ secrets.PYPI_PASSWORD_SPACEKIT_MAINTAINER }} | ||
test_password: ${{ secrets.PYPI_PASSWORD_SPACEKIT_MAINTAINER_TEST }} | ||
test_url: https://test.pypi.org/legacy/ | ||
verify_metadata: true | ||
skip_existing: false | ||
verbose: true | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
if: ${{ inputs.test == 'false' }} | ||
steps: | ||
# retrieve your distributions here | ||
- uses: actions/download-artifact@v2 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: ${{ env.user }} | ||
password: ${{ (inputs.test == 'true' && env.test_password) || env.password }} | ||
repository-url: ${{ (inputs.test == 'true' && env.test_url) || env.url }} | ||
verify-metadata: ${{ env.verify_metadata }} | ||
skip-existing: ${{ env.skip_existing }} | ||
verbose: ${{ env.verbose }} | ||
name: pypi | ||
user: ${{ secrets.PYPI_USERNAME_SPACEKIT_MAINTAINER }} | ||
password: ${{ secrets.PYPI_PASSWORD_SPACEKIT_MAINTAINER }} | ||
repository-url: https://pypi.org/p/spacekit | ||
verify-metadata: true | ||
skip-existing: false | ||
verbose: false |