Skip to content

Commit

Permalink
Adding a deployment workflow (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlovell authored Feb 12, 2025
2 parents 49a2650 + 912fcac commit ed2a99d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Python Package

on:
push:
tags:
- "v*.*.*" # Matches version tags like v1.0.0, v2.1.3, etc.

jobs:
build:
runs-on: ubuntu-latest
environment: pypi-deployment
# Grant the job permission to request an OIDC token
permissions:
contents: read
id-token: write

steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools-scm
- name: Build source distribution (sdist only)
run: python -m build --sdist

# We publish using the "Trusted Publisher" system on PyPi
- name: Publish to PyPI via OIDC
uses: pypa/[email protected]
with:
user: __token__

0 comments on commit ed2a99d

Please sign in to comment.