v1.1.1 #4
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: Build & Publish Package | |
on: | |
release: | |
types: [published] | |
jobs: | |
build-release: | |
name: Build Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: pip | |
cache-dependency-path: requirements*.txt | |
# Install uv package manager | |
- name: Install uv | |
run: | | |
python -m pip install --upgrade pip | |
pip install uv | |
- name: Install dependencies | |
run: | | |
uv sync --frozen --all-extras | |
uv pip install --upgrade build | |
- name: Build a binary wheel and a source tarball | |
run: | | |
uv run python -m build --sdist --wheel --outdir dist/ | |
- name: Publish build artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: built-package | |
path: "./dist" | |
publish-release: | |
name: Publish release to PyPI | |
needs: [build-release] | |
environment: "prod" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download build artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: built-package | |
path: './dist' | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true |