Skip to content

Commit

Permalink
feat: add action for releasing to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
senyai committed Nov 25, 2024
1 parent 94baa23 commit b7fac34
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PyPI Release

on:
pull_request:
# test only, must publish on tag creation only
branches: [ "main" ]
push:
tags:
- 'v*' # Triggers on version tags

jobs:
release:
name: Publish on PyPI
runs-on: ubuntu-latest
environment: Release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- run: |
pip install build &&
python -m build
- run: |
pip install twine &&
twine upload --repository testpypi dist/*
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
__pycache__
# build artifacts
/build
/dist
/*.egg-info

0 comments on commit b7fac34

Please sign in to comment.