mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-22 07:15:47 +00:00
bf38288feb
* ci(release): split channel pipelines and automate version transitions Introduce dedicated next/release orchestration workflows backed by a reusable publish pipeline with RC/final package version updates and post-release main dev bump PRs. Add a strict release process SOP with RC freeze, hotfix override, and mandatory backport rules. * ci(release): gate main-to-next promotion on green CI Add a dedicated workflow that validates main branch checks/statuses and block the promote-main-to-next flow unless main is green. Update the release SOP to reflect the enforced pre-promotion validation. * ci(release): fix channel promotion edge cases and policy gaps Switch channel promotions to reset-based snapshots with force-with-lease pushes, stop auto-merging channel nix-refresh PRs, and guard main dev bump against version downgrades. Add RC changelog fallback, require AUR release updates in SOP, and extend npmDepsHash sync to main/next/release pushes. * docs(release): clarify backport and nix refresh survivability rules Require RC fix backports to reach main before the next main-to-next promotion, and document that channel-local nix refresh PRs are advisory unless equivalent changes are merged into main.
50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
name: Promote next to release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
promote:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
ref: release
|
|
- name: setup node
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: lts/*
|
|
- name: fast-forward release to next
|
|
run: |
|
|
set -euo pipefail
|
|
git fetch origin next release
|
|
# Reset stable channel to next snapshot, then finalize version on top.
|
|
git reset --hard origin/next
|
|
- name: finalize package version for release
|
|
run: |
|
|
set -euo pipefail
|
|
CURRENT_VERSION="$(node -p 'require("./package.json").version')"
|
|
FINAL_VERSION="$(node -p 'const v=require("./package.json").version; const m=v.match(/^(\d+\.\d+\.\d+)/); if(!m){throw new Error("Invalid version: "+v)}; m[1]')"
|
|
if [[ "$CURRENT_VERSION" == "$FINAL_VERSION" ]]; then
|
|
echo "package.json is already final: $FINAL_VERSION"
|
|
exit 0
|
|
fi
|
|
npm version --no-git-tag-version "$FINAL_VERSION"
|
|
- name: commit final version bump
|
|
run: |
|
|
set -euo pipefail
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add package.json package-lock.json
|
|
if git diff --cached --quiet; then
|
|
echo "No finalization changes to commit."
|
|
exit 0
|
|
fi
|
|
NEW_VERSION="$(node -p 'require("./package.json").version')"
|
|
git commit -m "chore(release): finalize release version ${NEW_VERSION}"
|
|
- name: push release
|
|
run: git push --force-with-lease origin HEAD:release
|