Skip to content

v0.11.0

v0.11.0 #19

Workflow file for this run

name: release
on:
release:
types: [released]
jobs:
check:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Check most recent test run on `main`
id: latest-test-result
run: |
echo "result=$(gh run list \
--branch=main \
--workflow=test.yml \
--json headBranch,workflowName,conclusion \
--jq '.[] | select(.headBranch=="main" and .conclusion=="success") | .conclusion' \
| head -n 1)" >> $GITHUB_OUTPUT
- name: OK
if: ${{ (contains(steps.latest-test-result.outputs.result, 'success')) }}
run: exit 0
- name: Fail
if: ${{ !contains(steps.latest-test-result.outputs.result, 'success') }}
run: exit 1
pypi:
if: ${{ github.event_name == 'release' }}
runs-on: ubuntu-latest
needs: check
environment: release
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: westerveltco/setup-ci-action@v0
with:
python-version: "3.12"
extra-python-dependencies: hatch
use-uv: true
- name: Build package
run: |
hatch build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1