Skip to content

Commit 62c2e1b

Browse files
Update release.yaml
1 parent 7d64291 commit 62c2e1b

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

.github/workflows/release.yaml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1+
name: "Publish Python 🐍 distributions 📦 to PyPI"
12

2-
---
3-
name: Release
4-
5-
on: [push]
3+
on:
4+
release:
5+
types:
6+
- published
67

78
jobs:
8-
release:
9+
build-n-publish-pypi:
10+
name: Build and publish Python 🐍 distributions 📦 to PyPI
911
runs-on: ubuntu-latest
1012
steps:
1113
- uses: actions/checkout@v4
12-
- uses: actions/setup-python@v5
14+
with:
15+
fetch-depth: 0
16+
- name: Set up Python 3.9
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: 3.9
1320
- name: Install dependencies
1421
run: |
15-
python -m pip install -U pip wheel setuptools setuptools-scm twine
16-
- name: Build distributions
22+
python -m pip install --upgrade pip
23+
python -m pip install setuptools setuptools-scm wheel twine check-manifest
24+
- name: Build a binary wheel and a source tarball
1725
run: python setup.py sdist bdist_wheel
18-
19-
- name: Publish to PyPI
20-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
21-
uses: pypa/gh-action-pypi-publish@master
26+
- name: Publish distribution 📦 to PyPI
27+
uses: pypa/gh-action-pypi-publish@release/v1
2228
with:
23-
user: ${{ secrets.PYPI_USERNAME }}
24-
password: ${{ secrets.PYPI_PASSWORD }}
29+
user: __token__
30+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)