Skip to content

Commit 54e9327

Browse files
committed
chore(dc-init): update workflows + pin design-flows
1 parent 4c66e66 commit 54e9327

4 files changed

Lines changed: 29 additions & 7 deletions

File tree

.github/workflows/anglicise.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ jobs:
321321
322322
is_excluded_text_line() {
323323
local line="$1"
324-
echo "$line" | grep -qE '(https?://|file://|github/|[?&](color|center|gray|licence)=[a-zA-Z0-9]+|"Authorization": "Bearer|types:[[:space:]]*\[[^]]+\]|--[a-z-]+ (center|color|gray)|\$\{?(color|center|gray);\}|\b(color|center|gray|licence)[_A-Z]*=|license/licence|licence/license|license_file|licence_file|LICENSE(_FILES?)?|LICENSE.*LICENCE|LICENCE.*LICENSE|gum |\\$|shields\.io|stop-color|[a-z-]color[a-z-]*:|color[a-z-]*:[[:space:]]*#|align-items:)'
324+
echo "$line" | grep -qE "(https?://|file://|github/|[?&](color|center|gray|licence)=|=[\"'](center|color|licence)|\"Authorization\": \"Bearer|types:[[:space:]]*\[[^]]+\]|--[a-z-]+ (center|color|gray)|--color|--center|\$\{?(color|center|gray|licence)|\b(color|center|gray|licence|COLOR|CENTER|GRAY|LICENCE)[_A-Z]*=|license/licence|licence/license|license_file|licence_file|LICENSE(_FILES?)?|LICENSE.*LICENCE|LICENCE.*LICENSE|gum |\\$|shields\.io|stop-color|[a-z-]color[a-z-]*:|color[a-z-]*:[[:space:]]*#|align-items:)"
325325
}
326326
327327
echo "## British English Spelling Check" >> $GITHUB_STEP_SUMMARY
@@ -430,7 +430,7 @@ jobs:
430430
431431
is_excluded_text_line() {
432432
local line="$1"
433-
echo "$line" | grep -qE "(https?://|github/|[?&](color|center|gray|licence)=|=[\"'](center|color|licence)|types:[[:space:]]*\[[^]]+\]|--[a-z-]+ (center|color|gray)|--color|--center|\$\{?(color|center|gray|licence)|\b(COLOR|CENTER|GRAY|LICENCE)[_A-Z]*=|license/licence|licence/license|license_file|licence_file|LICENSE(_FILES?)?|LICENSE.*LICENCE|LICENCE.*LICENSE|gum |\\$|shields\.io|stop-color|[a-z-]color[a-z-]*:|color[a-z-]*:[[:space:]]*#|align-items:)"
433+
echo "$line" | grep -qE "(https?://|file://|github/|[?&](color|center|gray|licence)=|=[\"'](center|color|licence)|\"Authorization\": \"Bearer|types:[[:space:]]*\[[^]]+\]|--[a-z-]+ (center|color|gray)|--color|--center|\$\{?(color|center|gray|licence)|\b(color|center|gray|licence|COLOR|CENTER|GRAY|LICENCE)[_A-Z]*=|license/licence|licence/license|license_file|licence_file|LICENSE(_FILES?)?|LICENSE.*LICENCE|LICENCE.*LICENSE|gum |\\$|shields\.io|stop-color|[a-z-]color[a-z-]*:|color[a-z-]*:[[:space:]]*#|align-items:)"
434434
}
435435
436436
FIXED_COUNT=0

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ on:
116116
required: false
117117
type: boolean
118118
default: false
119+
normalize_version:
120+
description: 'Normalise v0.0.x to v0.1.0 (uncheck to keep v0.0.x scheme)'
121+
required: false
122+
type: boolean
123+
default: true
119124

120125
permissions:
121126
contents: write
@@ -179,8 +184,14 @@ jobs:
179184
MAJOR=${BASH_REMATCH[1]}
180185
MINOR=${BASH_REMATCH[2]}
181186
PATCH=${BASH_REMATCH[3]}
182-
VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))"
183-
echo "🔢 Auto-detected next version: ${VERSION} (from latest: v${LATEST})"
187+
# Normalise v0.0.x → v0.1.0 (standard semver starting point)
188+
if [[ "${{ github.event.inputs.normalize_version }}" != 'false' && "$MAJOR" -eq 0 && "$MINOR" -eq 0 ]]; then
189+
VERSION="0.1.0"
190+
echo "📐 Normalising v${LATEST} → v${VERSION} (standard semver convention)"
191+
else
192+
VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))"
193+
echo "🔢 Auto-detected next version: ${VERSION} (from latest: v${LATEST})"
194+
fi
184195
else
185196
echo "❌ Could not determine latest version to auto-increment"
186197
exit 1

.github/workflows/update.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ on:
9090
required: false
9191
type: boolean
9292
default: false
93+
normalize_version:
94+
description: 'Normalise v0.0.x to v0.1.0 (uncheck to keep v0.0.x scheme)'
95+
required: false
96+
type: boolean
97+
default: true
9398
check_dependencies:
9499
description: 'Check and update dependencies (package.json, requirements.txt)'
95100
required: false
@@ -203,7 +208,7 @@ jobs:
203208
while read -r t; do
204209
v="${t#v}"
205210
[[ "$v" != "$LATEST_VERSION" ]] && echo "$t" && break
206-
done)
211+
done) || true
207212
if [[ -n "$PRIOR_TAG" ]]; then
208213
CUMULATIVE_COUNT=$(git log "${PRIOR_TAG}..HEAD" --oneline | wc -l)
209214
else
@@ -245,7 +250,12 @@ jobs:
245250
git tag --list 'v*' --sort=-version:refname | grep -vE 'latest|alpha|beta|rc' | head -1)
246251
CURRENT_VERSION=${CURRENT_VERSION#v}
247252
248-
if [[ $CUMULATIVE_COUNT -ge $NEW_RELEASE_THRESHOLD ]]; then
253+
# Normalise v0.0.x → v0.1.0 (standard semver starting point)
254+
if [[ "${{ github.event.inputs.normalize_version }}" != 'false' && "$CURRENT_VERSION" =~ ^0\.0\.[0-9]+$ ]]; then
255+
echo "📐 Normalising v${CURRENT_VERSION} → v0.1.0 (standard semver convention)"
256+
RELEASE_VERSION="0.1.0"
257+
RELEASE_TYPE="new release"
258+
elif [[ $CUMULATIVE_COUNT -ge $NEW_RELEASE_THRESHOLD ]]; then
249259
# Cumulative changes across re-releases exceed ceiling — bump patch version
250260
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
251261
NEXT_VERSION="${MAJOR}.${MINOR}.$(( PATCH + 1 ))"
@@ -263,6 +273,7 @@ jobs:
263273
gh workflow run release.yml \
264274
--ref ${{ github.ref_name }} \
265275
-f version="${RELEASE_VERSION}" \
276+
-f normalize_version="${{ github.event.inputs.normalize_version || 'true' }}" \
266277
-f prerelease=false \
267278
-f draft=false
268279

0 commit comments

Comments
 (0)