Skip to content

Covers cache changes #221

Covers cache changes

Covers cache changes #221

Workflow file for this run

name: Publishing
on:
push:
branches:
- main
paths-ignore:
- docs/**
pull_request:
branches:
- main
paths-ignore:
- docs/**
env:
PY_VERSION: 3.14
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: astral-sh/setup-uv@v8.0.0
with:
python-version: ${{ env.PY_VERSION }}
- name: Install project
run: uv sync --locked --no-dev
- name: Run build
run: uv build
- uses: actions/upload-artifact@v7.0.1
with:
name: python-package-distributions
path: dist/
validate:
needs:
- build
permissions: {}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8.0.1
with:
name: python-package-distributions
path: dist/
- uses: astral-sh/setup-uv@v8.0.0
with:
python-version: ${{ env.PY_VERSION }}
- name: Validate dist
run: uv run --with twine twine check dist/*
publish:
environment:
name: pypi
url: https://pypi.org/p/Mediux-Posters
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
- validate
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8.0.1
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@v1.14.0