ci: yank.yml — workflow_dispatch to delete a tag on the public repo

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat/v1-foundation
boban 2026-06-23 03:13:02 +02:00
parent 7c5b4cf222
commit 84f84cbb03
1 changed files with 36 additions and 0 deletions

36
.github/workflows/yank.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Yank a public release
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to retract from the public repo (e.g. v0.10.0 or v0.10.0-beta1)'
required: true
permissions:
contents: read
jobs:
yank:
runs-on: ubuntu-latest
environment: production
steps:
- name: Validate the tag format
env:
TAG: ${{ inputs.tag }}
run: |
case "$TAG" in
v[0-9]*.[0-9]*.[0-9]*|v[0-9]*.[0-9]*.[0-9]*-beta[0-9]*) ;;
*) echo "refusing to yank an unrecognised tag: $TAG" >&2; exit 1 ;;
esac
- name: Checkout public repo
uses: actions/checkout@v4
with:
repository: ${{ vars.PUBLIC_REPO_SLUG }}
token: ${{ secrets.PUBLIC_REPO_TOKEN }}
fetch-depth: 0
path: pub
- name: Delete the tag on the public repo
env:
TAG: ${{ inputs.tag }}
run: |
git -C pub push origin --delete "refs/tags/${TAG}"