Skip to content

Commit

Permalink
Merge pull request #22 from WillJRoper/deploy
Browse files Browse the repository at this point in the history
Adding workflow for deployment to PyPi
  • Loading branch information
WillJRoper authored Oct 20, 2024
2 parents 3beae64 + 7ab2370 commit 0e83499
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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

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 dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools-scm
- name: Build the package
run: python -m build

- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload dist/*

0 comments on commit 0e83499

Please sign in to comment.