Publish Package #3
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: 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/* |