Publish Python Package #7
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 Python Package | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- Bump package version and create release | |
types: | |
- completed | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Flit | |
run: |- | |
python -m pip install flit | |
- name: Install Dependencies | |
run: |- | |
python -m flit install --symlink | |
- name: Publish to PyPI | |
env: | |
FLIT_USERNAME: __token__ | |
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: |- | |
python -m flit publish |