-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d64291
commit 62c2e1b
Showing
1 changed file
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
name: "Publish Python 🐍 distributions 📦 to PyPI" | ||
|
||
--- | ||
name: Release | ||
|
||
on: [push] | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
release: | ||
build-n-publish-pypi: | ||
name: Build and publish Python 🐍 distributions 📦 to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip wheel setuptools setuptools-scm twine | ||
- name: Build distributions | ||
python -m pip install --upgrade pip | ||
python -m pip install setuptools setuptools-scm wheel twine check-manifest | ||
- name: Build a binary wheel and a source tarball | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish to PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: ${{ secrets.PYPI_USERNAME }} | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |