Skip to content

Publish Package

Publish Package #3

Workflow file for this run

---
name: Publish Package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
on:
workflow_run:
workflows: ["Build Package"]
branches: ["main"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: publish-approval
steps:
- name: Download pacakge artifacts
uses: actions/download-artifact@v3
with:
name: python-package
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install twine
run: |
python -m pip install --upgrade pip
python -m pip install twine
- name: Publish
run: pipenv run twine upload dist/*