github-actions[bot] commited on
Commit
97f480d
Β·
1 Parent(s): f348f24

Is the suffering finally over? idk, maybe

Browse files
Files changed (1) hide show
  1. .github/workflows/build.yml +19 -28
.github/workflows/build.yml CHANGED
@@ -117,15 +117,23 @@ jobs:
117
  LAST_TAG=$(git describe --tags --abbrev=0 --match="build-*" 2>/dev/null || echo "")
118
  echo "βœ… Detected most recent ancestor tag: $LAST_TAG"
119
 
120
- RANGE="${LAST_TAG:+$LAST_TAG..HEAD}"
121
- echo "πŸ” Generating changelog for range: $RANGE"
122
-
123
- git-cliff \
124
- --config cliff.toml \
125
- --strip all \
126
- --output changelog.md \
127
- ${RANGE:---unreleased}
 
 
 
 
 
 
 
128
 
 
129
  if [ -s changelog.md ]; then
130
  echo "βœ… Changelog generated successfully"
131
  CHANGELOG_B64=$(base64 -w 0 changelog.md)
@@ -133,26 +141,9 @@ jobs:
133
  echo "has_changelog=true" >> $GITHUB_OUTPUT
134
  echo "previous_tag=$LAST_TAG" >> $GITHUB_OUTPUT
135
  else
136
- echo "⚠️ Empty changelog β€” falling back to manual list"
137
-
138
- # Manual fallback
139
- echo "## Recent Changes" > changelog.md
140
- echo "" >> changelog.md
141
-
142
- if [ -n "$LAST_TAG" ]; then
143
- echo "### πŸ“ Commits since $LAST_TAG:" >> changelog.md
144
- git log --oneline --pretty=format:"- %s (\`%h\`)" "$LAST_TAG..HEAD" >> changelog.md
145
- else
146
- echo "### πŸ“ Recent commits:" >> changelog.md
147
- git log --oneline --pretty=format:"- %s (\`%h\`)" -10 >> changelog.md
148
- fi
149
-
150
- echo "" >> changelog.md
151
- echo "> This changelog was generated manually due to git-cliff issues." >> changelog.md
152
-
153
- CHANGELOG_B64=$(base64 -w 0 changelog.md)
154
- echo "changelog_b64=$CHANGELOG_B64" >> $GITHUB_OUTPUT
155
- echo "has_changelog=true" >> $GITHUB_OUTPUT
156
  fi
157
 
158
  - name: Debug artifact contents
 
117
  LAST_TAG=$(git describe --tags --abbrev=0 --match="build-*" 2>/dev/null || echo "")
118
  echo "βœ… Detected most recent ancestor tag: $LAST_TAG"
119
 
120
+ if [ -n "$LAST_TAG" ]; then
121
+ # Standard run: A previous tag was found.
122
+ echo "πŸ” Generating changelog for range: $LAST_TAG..HEAD"
123
+ git-cliff \
124
+ --config cliff.toml \
125
+ --strip all \
126
+ --output changelog.md \
127
+ "$LAST_TAG..HEAD"
128
+ else
129
+ # First run: No previous tag found.
130
+ echo "⚠️ No previous build tag found. Generating initial release changelog."
131
+ echo "## Initial Release" > changelog.md
132
+ echo "" >> changelog.md
133
+ echo "This is the first automated build release using this format. Future releases will contain a detailed list of changes." >> changelog.md
134
+ fi
135
 
136
+ # This part of the script remains to handle the output
137
  if [ -s changelog.md ]; then
138
  echo "βœ… Changelog generated successfully"
139
  CHANGELOG_B64=$(base64 -w 0 changelog.md)
 
141
  echo "has_changelog=true" >> $GITHUB_OUTPUT
142
  echo "previous_tag=$LAST_TAG" >> $GITHUB_OUTPUT
143
  else
144
+ # This is now a true error condition
145
+ echo "❌ Critical error: Changelog is empty after generation."
146
+ echo "has_changelog=false" >> $GITHUB_OUTPUT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  fi
148
 
149
  - name: Debug artifact contents