mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-13 08:15:14 +02:00
refactor(release): drop release-policy.json runtime dep and next branch
Strips the release-policy.json fallback from release-version.ts so the CLI
reads its version straight from packages/cli/package.json. dev → 0.0.0-private,
installed @kaelio/ktx → the real semver baked into the published package.json.
KtxCliPackageInfo collapses to { name, version, contextPackageName }; /health
no longer depends on version files surviving past a CI run.
Replaces the dual-branch (main + next) semantic-release model with a single-
branch model on main. rcs and stables interleave on the same branch via
{ name: 'main', prerelease: 'rc', channel: 'next' } / ['main']. Drops
@semantic-release/git and @semantic-release/changelog (nothing is committed
back to the repo on any channel) and the workflow's "Prepare next prerelease
branch" step plus the KTX_PRERELEASE_BRANCH plumbing. The git tag plus the
published npm artifact carry the version forward.
Updates docs/release.md, removes the two now-unused devDeps, regenerates
pnpm-lock.yaml. 611/611 @ktx/cli tests, 173/173 script tests, type-check,
biome, knip all clean.
This commit is contained in:
parent
a0d3ddbbc2
commit
66b674f73a
13 changed files with 83 additions and 320 deletions
45
.github/workflows/release.yml
vendored
45
.github/workflows/release.yml
vendored
|
|
@ -69,27 +69,6 @@ jobs:
|
|||
- name: Install Python dependencies
|
||||
run: uv sync --all-packages
|
||||
|
||||
- name: Prepare next prerelease branch
|
||||
if: ${{ inputs.release_kind == 'rc' }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
source_sha="$(git rev-parse HEAD)"
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
if git ls-remote --exit-code --heads origin "${KTX_PRERELEASE_BRANCH}" >/dev/null 2>&1; then
|
||||
git fetch origin "${KTX_PRERELEASE_BRANCH}"
|
||||
git checkout -B "${KTX_PRERELEASE_BRANCH}" "origin/${KTX_PRERELEASE_BRANCH}"
|
||||
git merge --no-edit "${source_sha}"
|
||||
else
|
||||
git checkout -B "${KTX_PRERELEASE_BRANCH}" "${source_sha}"
|
||||
fi
|
||||
|
||||
git push --set-upstream origin "HEAD:${KTX_PRERELEASE_BRANCH}"
|
||||
env:
|
||||
KTX_PRERELEASE_BRANCH: next
|
||||
|
||||
- name: Prepare npm package root for release verification
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
|
@ -112,36 +91,16 @@ jobs:
|
|||
|
||||
- name: Dry-run semantic release
|
||||
if: ${{ !inputs.publish_live }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if [ "${KTX_RELEASE_KIND}" = "rc" ]; then
|
||||
export GITHUB_REF="refs/heads/${KTX_PRERELEASE_BRANCH}"
|
||||
export GITHUB_REF_NAME="${KTX_PRERELEASE_BRANCH}"
|
||||
export GITHUB_SHA="$(git rev-parse HEAD)"
|
||||
fi
|
||||
|
||||
pnpm run semantic-release:dry-run
|
||||
run: pnpm run semantic-release:dry-run
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
KTX_RELEASE_KIND: ${{ inputs.release_kind }}
|
||||
KTX_PRERELEASE_BRANCH: next
|
||||
FORCE_RELEASE: ${{ inputs.force_release }}
|
||||
|
||||
- name: Create semantic release
|
||||
if: ${{ inputs.publish_live }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if [ "${KTX_RELEASE_KIND}" = "rc" ]; then
|
||||
export GITHUB_REF="refs/heads/${KTX_PRERELEASE_BRANCH}"
|
||||
export GITHUB_REF_NAME="${KTX_PRERELEASE_BRANCH}"
|
||||
export GITHUB_SHA="$(git rev-parse HEAD)"
|
||||
fi
|
||||
|
||||
pnpm run semantic-release
|
||||
run: pnpm run semantic-release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
KTX_RELEASE_KIND: ${{ inputs.release_kind }}
|
||||
KTX_PRERELEASE_BRANCH: next
|
||||
FORCE_RELEASE: ${{ inputs.force_release }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue