Skip to content

Commit

Permalink
[skip-ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Dec 20, 2023
1 parent 6dd785a commit cd5b121
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ jobs:
name: releases
path: dist

test-built-dist:
test-built:
needs: build-artifacts
runs-on: ubuntu-latest
environment:
name: testpypi
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/setup-python@v3
name: Install Python
Expand All @@ -74,26 +70,36 @@ jobs:
python -m pip install --upgrade pip
python -m pip install dist/argopy*.whl
upload-to-testpypi:
needs: test-build
runs-on: ubuntu-latest
environment:
name: testpypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: releases
path: dist
- name: Publish package to TestPyPI
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: pypa/gh-action-pypi-publish@release/v1
with:
# user: __token__
# password: ${{ secrets.PYPITEST_TOKEN }}
repository_url: https://test.pypi.org/legacy
repository-url: https://test.pypi.org/legacy
verbose: true
# verify_metadata: false
skip_existing: true
skip-existing: true

upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/argopy
name: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit cd5b121

Please sign in to comment.