Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/publish-aauth.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Publish introspection-aauth to PyPI

run-name: "Publish ${{ inputs.tag || github.ref_name }}"

# packages/introspection-aauth is its own distribution, released by
# release-please as `introspection-aauth-v*` tags. PyPI trusts this workflow
# file and the `publish` environment for the `introspection-aauth` project.
on:
push:
tags:
- "introspection-aauth-v*"
workflow_dispatch:
inputs:
tag:
description: "Release tag to publish, e.g. introspection-aauth-v1.0.0"
required: true
type: string

concurrency:
group: release-publish-aauth
cancel-in-progress: false

jobs:
publish:
name: Publish ${{ inputs.tag || github.ref_name }} to PyPI
runs-on: ubuntu-latest
environment: publish
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: packages/introspection-aauth
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.tag || github.ref }}

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"

- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.11"

- name: The tag names the package's version
env:
TAG: ${{ inputs.tag || github.ref_name }}
run: |
VERSION=$(uv version --short)
if [ "${TAG}" != "introspection-aauth-v${VERSION}" ]; then
echo "::error::${TAG} does not name pyproject.toml's version ${VERSION}"
exit 1
fi

- name: Run tests
run: |
uv sync --all-extras
uv run pytest tests/ -q

- name: Build package
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/introspection-aauth/dist
Loading