Skip to content

Release Python Package #9

Release Python Package

Release Python Package #9

Workflow file for this run

---
name: Release Python Package
# Run when python test runs successfully on master branch
on:
workflow_run:
workflows: ["Python Test"]
branches: ["main"]
types:
- completed
jobs:
python-build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
poetry-version: [1.4.1]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Build sdist and wheel
run: poetry build
- name: Publish to public pypi
run: |
poetry config pypi-token.pypi ${PYPI_TOKEN}
poetry publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}