Files
trebuchet/.gitea/workflows/rollback-beta.yml
T
Chris Farhood b8fda2b5f4 chore: move .github folder to .gitea for Gitea compatibility
Gitea prefers .gitea/ISSUE_TEMPLATE/ and .gitea/workflows/ over the
GitHub-convention .github/ equivalents. Moves all issue templates and
workflow files to the Gitea-native paths and updates CLAUDE.md references.

Cosign certificate identity paths in release/rollback workflows are
intentionally left unchanged — they reference the signing identity from
prior workflow runs and will need a separate update when the CI signing
infrastructure migrates.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-18 15:33:14 +00:00

72 lines
2.0 KiB
YAML

name: Rollback (Beta)
on:
workflow_dispatch:
inputs:
version:
description: "Beta version to roll back to (example: 1.0.0-beta.2)"
required: true
type: string
permissions:
contents: read
concurrency:
group: rollback-beta-${{ github.event.inputs.version }}
cancel-in-progress: false
jobs:
rollback:
name: Roll back npm beta dist-tag
runs-on: runners-farhoodlabs
steps:
- name: Validate target version
id: target
shell: bash
env:
RAW_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
VERSION="${RAW_VERSION#v}"
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$ ]]; then
echo "Version must be in format X.Y.Z-beta.N (e.g. 1.0.0-beta.2)"
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Verify npm package version exists
run: npm view "@trebuchet/cli@${{ steps.target.outputs.version }}" version
- name: Show current npm dist-tags
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm dist-tag ls @trebuchet/cli
- name: Move npm beta tag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm dist-tag add "@trebuchet/cli@${{ steps.target.outputs.version }}" beta
- name: Show final npm dist-tags
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm dist-tag ls @trebuchet/cli
- name: Write summary
run: |
{
echo "## Rollback beta"
echo ""
echo "- Target version: \`${{ steps.target.outputs.version }}\`"
echo "- npm package: \`@trebuchet/cli\` (beta tag moved)"
} >> "$GITHUB_STEP_SUMMARY"