Skip to content

Commit

Permalink
Add pypi workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cmalinmayor committed May 14, 2024
1 parent 4221b06 commit 77a1624
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy

on:
push:
tags: ["*"]
workflow_dispatch:

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Build a binary wheel and a source tarball
run: |
python -m pip install -U pip
python -m pip install build
python -m build --sdist --wheel --outdir dist/
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true

0 comments on commit 77a1624

Please sign in to comment.