Publish package on PyPI #2
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
# SPDX-FileCopyrightText: Copyright © 2024 Idiap Research Institute <[email protected]> | |
# | |
# SPDX-FileContributor: Philip Abbet <[email protected]> | |
# | |
# SPDX-License-Identifier: GPL-3.0-only | |
name: Publish | |
run-name: Publish package on PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-on-pypi: | |
name: Publish package on PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Install the Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install twine build | |
- name: Build the source package | |
run: python3 -m build --sdist | |
- name: Upload to PyPI | |
run: twine upload dist/pygafro-*.tar.gz | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} |