Skip to content

Commit

Permalink
Add workflow to publish releases to PyPI.
Browse files Browse the repository at this point in the history
Fixes #73
  • Loading branch information
jarondl committed Jul 14, 2023
1 parent 5301eca commit bb424c0
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish-to-pypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build, and perhaps publish to PyPI

on: push

jobs:
build-and-publish:
name: Build and optionally publish
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pygtfs
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python3 -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish tagged versions to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit bb424c0

Please sign in to comment.