Skip to content

Commit

Permalink
cd: publish releases to PyPI with GA
Browse files Browse the repository at this point in the history
  • Loading branch information
Juarez Rudsatz authored and juarezr committed Feb 2, 2022
1 parent 4631647 commit 552808d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
release:
types: [published]

jobs:
pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install pypa/build
run: |
python -m pip install build --user
- name: Build the petl package as source tarball
run: |
# python setup.py sdist
python -m build --sdist --outdir dist/ .
- name: Publish the package version ${{ github.event.release.tag_name }} to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true

0 comments on commit 552808d

Please sign in to comment.