Skip to content

Commit 46543d9

Browse files
committed
Configure publishing
1 parent dfa70fd commit 46543d9

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,22 @@ jobs:
5656
name: wheels
5757
path: dist
5858

59-
release:
60-
name: Release
61-
runs-on: ubuntu-latest
62-
if: "startsWith(github.ref, 'refs/tags/')"
59+
publish-to-pypi:
60+
name: >-
61+
Publish Python 🐍 distribution 📦 to PyPI
62+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
6363
needs: [linux, sdist]
64+
runs-on: ubuntu-latest
65+
environment:
66+
name: pypi
67+
url: https://pypi.org/p/py-perf-event
68+
permissions:
69+
id-token: write
6470
steps:
65-
- uses: actions/download-artifact@v3
66-
with:
67-
name: wheels
68-
- name: Publish to PyPI
69-
uses: PyO3/maturin-action@v1
70-
env:
71-
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
72-
with:
73-
command: upload
74-
args: --non-interactive --skip-existing *
71+
- name: Download all the dists
72+
uses: actions/download-artifact@v3
73+
with:
74+
name: python-package-distributions
75+
path: dist/
76+
- name: Publish distribution 📦 to PyPI
77+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)