v2024.06.08 #26
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 Package to PyPI | |
on: | |
release: | |
types: [published, edited] | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
environment: release | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version-file: .python-version | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip uv | |
uv pip install --system --upgrade setuptools setuptools_scm[toml] wheel twine build | |
- name: Build | |
run: | | |
python3 -m setuptools_scm --strip-dev | |
python3 -m build --sdist --wheel --outdir dist/ . | |
python3 -m twine check dist/* | |
- name: Publish to PyPI | |
run: | | |
python3 -m twine upload -r pypi -u __token__ -p ${{ secrets.PYPI_PASSWORD }} --non-interactive dist/* |