Skip to content

Commit

Permalink
Add github action to publish package to testPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Feb 5, 2024
1 parent 6526203 commit 4c6a5e8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PyPI publishing

on: push

jobs:
pypi:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
# build the calculate-liam package and store outputs in dist folder
- run: pipx run build calculate-liam -o dist
# check the files in dist are valid
- run: pipx run twine check dist/*
# if this commit is tagged, upload the release to (test)PyPI
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

0 comments on commit 4c6a5e8

Please sign in to comment.