Files
grimmory/.github/workflows/release-preview.yml
T
James Cox 4855f36d46 build(yarn): migrate frontend and release tooling to yarn 4
- Frontend package management:
  - add a repo-root `.yarnrc.yml` that pins Yarn to the `node-modules` linker with a local cache
  - add the modern Yarn package manager declaration to `frontend/package.json`
  - replace the frontend npm lockfile with `frontend/yarn.lock`
  - move the frontend Just recipes to Corepack-managed Yarn commands for install, audit, build, test, and lint
  - run the production build in CI-style mode so non-interactive Yarn builds behave consistently
- Release automation:
  - add the modern Yarn package manager declaration to `tools/release/package.json`
  - replace the release tooling npm lockfile with `tools/release/yarn.lock`
  - switch the release Just recipes from `npm` and `npx` to Corepack-managed Yarn scripts
- CI and local runtime wiring:
  - switch the frontend and release GitHub Actions caches from npm lockfiles to Yarn lockfiles
  - update the root `doctor` output and contributor prerequisites to report Yarn and Corepack instead of npm
  - update the dev compose UI container to Node 24 with immutable Yarn installs
  - restore the Docker frontend build stage to install and build through Yarn, including the shared cache path
- Repository hygiene:
  - ignore the repo-local Yarn cache and per-project Yarn state directories created by modern Yarn installs

- Validation:
  - `just ui install-ci`
  - `just release install`
  - `just ui build`
  - `just image-build linux/amd64 codex-yarn-port-test` was not runnable because the local Docker daemon was unavailable
2026-04-22 17:26:40 -04:00

79 lines
2.5 KiB
YAML

name: Release - Dry Run Preview
on:
workflow_dispatch:
inputs:
ref:
description: 'Ref or commit to preview as the next stable release candidate promoted onto main'
required: false
default: develop
type: string
jobs:
preview:
name: Preview Next Stable Release
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
ref: ${{ inputs.ref }}
- name: Prepare Stable Release Preview
run: |
set -eu
git fetch origin main --tags --force
if ! git merge-base --is-ancestor origin/main HEAD; then
echo "Selected ref does not contain origin/main and cannot be promoted cleanly to main" >&2
exit 1
fi
echo "Previewing release candidate range origin/main..HEAD"
{
echo "## Stable Release Preview"
echo
echo "- Base branch: \`main\`"
echo "- Candidate ref: \`$(git rev-parse --short HEAD)\`"
echo "- Range: \`origin/main..HEAD\`"
echo
echo "### Included Commits"
git log --reverse --no-merges --pretty='- %h %s' origin/main..HEAD || true
} >> "$GITHUB_STEP_SUMMARY"
git checkout -B main "$(git rev-parse HEAD)"
- name: Install just
uses: taiki-e/install-action@0d865d5cc6d507df4765f1f866bfae8bab4e2a73 # v2.69.7
with:
tool: just
- name: Set Up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: '24'
cache: 'yarn'
cache-dependency-path: tools/release/yarn.lock
- name: Install Release Tooling Dependencies
run: just release install
- name: Run semantic-release Dry Run
env:
GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN != '' && secrets.RELEASE_BOT_TOKEN || github.token }}
run: just release preview | tee semantic-release-preview.log
- name: Upload Preview Output
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: semantic-release-preview
path: semantic-release-preview.log
retention-days: 14