v4.2.2 #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload Python Package | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: "Python Package Deployment" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry config virtualenvs.create false | |
poetry install | |
- name: build release distributions | |
run: | | |
# NOTE: put your own distribution build steps here. | |
poetry build | |
- name: upload dists | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-dists | |
path: dist/ | |
publish: | |
runs-on: ubuntu-latest | |
environment: "Python Package Deployment" | |
permissions: | |
id-token: write | |
needs: | |
- build | |
steps: | |
- name: Retrieve release distributions | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-dists | |
path: dist/ | |
- name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |