Skip to content

Commit 31e763c

Browse files
fix(release): skip wiki push in CI, add post-release wiki update to CD (#104)
* chore: remove husky No git hooks needed - actionlint runs in CI via the validate-workflows job. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * chore(deps): bump actions to Node.js 24 compatible versions actions/checkout: v4 -> v6 actions/setup-dotnet: v4 -> v5 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(release): skip wiki push during version PR, move to CD post-release update-version.ts skips pullWiki/pushWiki when GITHUB_ACTIONS is set. cd.yml gains post-release Update wiki step using GITHUB_TOKEN. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 85ca40b commit 31e763c

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

.build/update-version.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,14 @@ function pushWiki() {
147147
}
148148

149149
// --- Main ---
150-
pullWiki();
150+
// When running in CI (changeset version PR creation), skip the wiki push.
151+
// The wiki is updated post-release in the CD pipeline instead.
152+
const isCI = !!process.env.GITHUB_ACTIONS;
153+
154+
if (!isCI) {
155+
pullWiki();
156+
}
151157
updateFilesVersion();
152-
pushWiki();
158+
if (!isCI) {
159+
pushWiki();
160+
}

.github/workflows/cd.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,25 @@ jobs:
163163
if: ${{ steps.release-check.outputs.should_release != 'true' }}
164164
run: echo "Release ${{ steps.version.outputs.tag }} already exists — skipping."
165165

166+
- name: Set up Bun
167+
if: ${{ steps.release-check.outputs.should_release == 'true' }}
168+
uses: oven-sh/setup-bun@v2
169+
170+
- name: Install dependencies
171+
if: ${{ steps.release-check.outputs.should_release == 'true' }}
172+
run: bun install
173+
174+
- name: Update wiki
175+
if: ${{ steps.release-check.outputs.should_release == 'true' }}
176+
env:
177+
GH_TOKEN: ${{ github.token }}
178+
shell: bash
179+
run: |
180+
set -euo pipefail
181+
182+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
183+
git config --global user.name "github-actions[bot]"
184+
git config --global url."https://x-access-token:${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
185+
186+
bun .build/update-version.ts
187+

0 commit comments

Comments
 (0)