Skip to content

release

release #9

Workflow file for this run

name: "Release to PyPI"
on:
workflow_dispatch:
push:
branches: ["main"]
defaults:
run:
shell: "pwsh"
env:
UV_CACHE_DIR: ".cache/uv-cache"
UV_SYSTEM_PYTHON: "true"
jobs:
build:
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
with:
submodules: True
- uses: "actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" # v4.0.2
with:
path: "${{ env.UV_CACHE_DIR }}"
key: "uv-${{ matrix.runner }}-${{ matrix.python }}-${{ hashFiles('lock.json') }}"
- uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0
with:
python-version: "${{ matrix.python }}"
- run: "scripts/Sync-Py.ps1"
- run: ". scripts/Initialize-Shell.ps1; flit build"
- uses: "actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808" # v4.3.3
with:
name: "python-package-distributions"
path: "dist/"
publish-to-pypi:
if: github.ref || format('{0}{1}', 'refs/tags/', github.event.release.tag_name)
name: "Publish Python 🐍 distribution 📦 to PyPI"
needs: "build"
permissions:
id-token: "write"
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
environment:
name: "release"
url: "https://pypi.org/p/boilercv"
steps:
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "python-package-distributions"
path: "dist/"
- uses: "pypa/gh-action-pypi-publish@release/v1"