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
22 changes: 22 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,34 @@ on:
permissions:
contents: write
pull-requests: write
actions: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

# release-please-action authenticates with GITHUB_TOKEN, and GitHub
# Actions doesn't let events triggered by GITHUB_TOKEN (like the
# `release` this action creates) start other workflows -- only
# workflow_dispatch/repository_dispatch are exempt from that
# anti-recursion rule. So dispatch release.yml explicitly here
# instead of relying on its `on: release: types: [created]` trigger,
# which never fires as a result.
#
# Must dispatch against the release tag, not the main branch: the
# `pypi` deploy environment's protection rules only allow deploys
# from refs matching `v*` (a tag), so `--ref main` gets rejected at
# the publish step even though build/smoke-test pass.
- name: Trigger PyPI publish
if: ${{ steps.release.outputs.releases_created }}
run: |
tag=$(gh release list --limit 1 --json tagName -q '.[0].tagName')
gh workflow run release.yml --ref "$tag"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}