Skip to content

Commit

Permalink
Use PyPI trusted publishers
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Sep 10, 2023
1 parent 84d0120 commit 2a1c5e4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,3 @@ jobs:
run: |
python -m tox
- uses: codecov/codecov-action@v3
publish:
runs-on: ubuntu-latest
needs:
- tests
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Build a binary wheel and a source tarball
run: pipx run build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
release:
types:
- published

name: release

jobs:
pypi:
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release

permissions:
# Used to authenticate to PyPI via OIDC.
id-token: write

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ">= 3.8"

- name: build
run: pipx run build

- name: publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 2a1c5e4

Please sign in to comment.