Skip to content

Commit 68c27cc

Browse files
claudensheaps
authored andcommitted
fix: release workflow failures and set initial version to 0.0.1
- Set package.json version to 0.0.1 - Set requireUpstream to false in release-it config (actions/checkout doesn't set up branch tracking, causing release-it to fail) - Set getLatestTagFromAllRefs to true so release-it can find tags - Move git config before version detection in auto-release workflow - Set up branch tracking in both release workflows - Capture stderr from release-it --release-version to aid debugging https://claude.ai/code/session_01RWAqFwsHjJ8qnR2WRs5eVM
1 parent d010406 commit 68c27cc

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

.github/workflows/auto-release.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,32 @@ jobs:
3232
- name: Run quality gate
3333
run: bun run validate
3434

35+
- name: Configure git
36+
run: |
37+
git config user.name "github-actions[bot]"
38+
git config user.email "github-actions[bot]@users.noreply.github.com"
39+
# Set up branch tracking so release-it doesn't fail on upstream check
40+
git branch --set-upstream-to=origin/main main 2>/dev/null || true
41+
3542
- name: Determine version bump
3643
id: version
3744
run: |
45+
set +e
3846
# Get the recommended bump from conventional commits
39-
NEXT_VERSION=$(bunx release-it --release-version --ci 2>/dev/null || echo "")
40-
if [ -z "$NEXT_VERSION" ]; then
41-
echo "No version bump detected from conventional commits"
47+
NEXT_VERSION=$(bunx release-it --release-version --ci 2>&1)
48+
EXIT_CODE=$?
49+
set -e
50+
51+
if [ $EXIT_CODE -ne 0 ] || [ -z "$NEXT_VERSION" ]; then
52+
echo "No version bump detected from conventional commits (exit code: $EXIT_CODE)"
53+
echo "Output: $NEXT_VERSION"
4254
echo "skip=true" >> $GITHUB_OUTPUT
4355
else
4456
echo "next_version=$NEXT_VERSION" >> $GITHUB_OUTPUT
4557
echo "skip=false" >> $GITHUB_OUTPUT
4658
echo "Next version: $NEXT_VERSION"
4759
fi
4860
49-
- name: Configure git
50-
if: steps.version.outputs.skip != 'true'
51-
run: |
52-
git config user.name "github-actions[bot]"
53-
git config user.email "github-actions[bot]@users.noreply.github.com"
54-
5561
- name: Release
5662
if: steps.version.outputs.skip != 'true'
5763
run: bun run release:ci

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
run: |
4949
git config user.name "github-actions[bot]"
5050
git config user.email "github-actions[bot]@users.noreply.github.com"
51+
git branch --set-upstream-to=origin/main main 2>/dev/null || true
5152
5253
- name: Release
5354
run: bun run release:ci -- --increment ${{ inputs.increment }} ${{ inputs.dry-run && '--dry-run' || '' }}

.release-it.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"tagName": "v${version}",
88
"push": true,
99
"requireCleanWorkingDir": true,
10-
"requireUpstream": true,
11-
"getLatestTagFromAllRefs": false
10+
"requireUpstream": false,
11+
"getLatestTagFromAllRefs": true
1212
},
1313
"npm": {
1414
"publish": false

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cept",
3-
"version": "0.1.0",
3+
"version": "0.0.1",
44
"private": true,
55
"type": "module",
66
"description": "A fully-featured Notion clone backed by Git. Client-only. Offline-first. Collaborative.",

0 commit comments

Comments
 (0)