Skip to content

Commit

Permalink
Add GitHub action to build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
RCoff committed May 24, 2024
1 parent 685831d commit 6f0c750
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Python Package

on:
push:
tags:
- 'v*.*.*'

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.6.5' # Specify your required Python version

- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine setuptools wheel
- name: Build the package
run: python -m build

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

0 comments on commit 6f0c750

Please sign in to comment.