Skip to content

Commit

Permalink
Update actions to use trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopasra committed Feb 23, 2024
1 parent 7f663d9 commit 2c8b126
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
python-version: '3.11'

- name: Install wheel
run: |
Expand All @@ -31,12 +31,12 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
python-version: '3.11'

- name: Install build
run: |
Expand All @@ -53,6 +53,9 @@ jobs:
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
# upload to PyPI on every tag starting with 'v'
#if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
Expand All @@ -64,7 +67,3 @@ jobs:
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/

0 comments on commit 2c8b126

Please sign in to comment.