brand_yml v0.1.0 #5
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: Python - Release | |
on: | |
release: | |
types: [published] | |
env: | |
UV_VERSION: "0.4.x" | |
PYTHON_VERSION: 3.13 | |
jobs: | |
py-release: | |
name: Build and release Python package | |
runs-on: ubuntu-latest | |
# Python release tags start with "py/v*" | |
if: startsWith(github.ref, 'refs/tags/py/v') | |
environment: | |
name: pypi | |
url: https://pypi.org/project/brand_yml/ | |
permissions: # for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: π Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: ${{ env.UV_VERSION }} | |
- name: π Set up Python ${{ env.PYTHON_VERSION }} | |
run: uv python install ${{ env.PYTHON_VERSION }} | |
- name: π¦ Install the project | |
run: uv sync --python ${{ env.PYTHON_VERSION }} --no-dev --extra test | |
- name: π§ͺ Check tests | |
run: make py-check-tests | |
- name: π Check types | |
run: make py-check-types | |
- name: π Check formatting | |
run: make py-check-format | |
- name: 𧳠Build package | |
run: uv build | |
- name: π’ Publish release on PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |