Skip to content

Publish to PyPi

Publish to PyPi #2

name: Publish to PyPi
# Only trigger the workflow manually (e.g. when deps changes)
on: workflow_dispatch
jobs:
# Publish when version is increased
publish-job:
# Only try to publish if:
# * Repo is self (prevents running from forks)
# * Branch is `main`
if: |
github.repository == 'google-research/spade_anomaly_detection'
&& github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 30
steps:
# Publish the package (if local `__version__` > pip version)
- uses: etils-actions/pypi-auto-publish@v1
with:
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
parse-changelog: true