Skip to content

Commit

Permalink
Updated trusted publisher on pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuntz committed Nov 2, 2024
1 parent e33ced1 commit a2c48b9
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --editable .
python -m pip install --editable .
build_sdist:
name: sdist on ${{ matrix.os }} with py ${{ matrix.python-version }}
Expand Down Expand Up @@ -79,28 +79,27 @@ jobs:
upload_to_pypi:
needs: [build_sdist]
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read

steps:
- uses: actions/download-artifact@v4
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
path: dist/

- name: Publish to Test PyPI
# only if working on master
if: github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_token }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
# verbose: true

- name: Publish to PyPI
- name: Publish release to PyPI
# only if tagged
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}

0 comments on commit a2c48b9

Please sign in to comment.