Skip to content

release

release #10

Workflow file for this run

# Publish release
name: "release"
on:
workflow_dispatch:
release:
types: ["published"]
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; python -m build"
- uses: "actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808" # v4.3.3
with:
name: "python-package-distributions"
path: "dist/"
publish:
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@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0" # v1.9.0
github-release:
needs: "build"
permissions:
contents: "write"
id-token: "write"
strategy:
matrix:
runner: ["ubuntu-22.04"]
python: ["3.11"]
runs-on: "${{ matrix.runner }}"
steps:
- uses: "actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e" # v4.1.7
with:
name: "python-package-distributions"
path: "dist/"
- uses: "sigstore/gh-action-sigstore-python@61f6a500bbfdd9a2a339cf033e5421951fbc1cd2" # v2.1.1
with:
inputs: "./dist/*.tar.gz ./dist/*.whl"
- run: "gh release upload '${{ github.event.release.tag_name }}' dist/**"
env:
GITHUB_TOKEN: ${{ github.token }}