Create python-publish.yml
This commit is contained in:
29
.github/workflows/python-publish.yml
vendored
Normal file
29
.github/workflows/python-publish.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user