Create python-publish.yml

This commit is contained in:
UpstreamData
2022-07-07 15:12:38 -06:00
committed by GitHub
parent ca77573624
commit 477a411c87

29
.github/workflows/python-publish.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Poetry
run: curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- name: Add Poetry to path
run: echo "${HOME}/.poetry/bin" >> $GITHUB_PATH
- name: Install venv
run: poetry install
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
- name: Publish package
run: poetry publish --build