v0.4.3 #8
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: Publish to PyPI | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: 📦 Build | |
runs-on: ubuntu-latest | |
env: | |
UV_PYTHON: "3.12.6" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v2 | |
with: | |
version: "0.4.15" | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Set up Python ${{ env.UV_PYTHON }} | |
run: uv python install ${{ env.UV_PYTHON }} | |
- name: Install the project | |
run: uv sync --extra dev --extra tests | |
- name: Minimize uv cache | |
run: uv cache prune --ci | |
- name: Build dist | |
run: uv build | |
- name: Verify wheel installation | |
run: | | |
mkdir -p verify | |
cd verify | |
uv venv ${{ env.UV_PYTHON }} | |
uv pip install ../dist/*.whl | |
uv run python -c "import ftl_extract; print(ftl_extract.__version__)" | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish: | |
name: 🐍 Publish | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/ftl-extract | |
permissions: | |
id-token: write # IMPORTANT: mandatory for trusted publishing | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |