fix(ci): keep version suffix/build in tags and fix Node.js cache

- Keep full version format (0.0.1-m3 or 1.2.3+456) instead of stripping suffix

- Tags now include full version: krow-withus-worker-mobile/dev-v0.0.1-m3

- Remove invalid Node.js cache path that was causing resolution errors
This commit is contained in:
Achintha Isuru
2026-03-05 14:21:27 -05:00
parent be43030058
commit 639aeeb708
2 changed files with 6 additions and 8 deletions

View File

@@ -34,13 +34,13 @@ if [ -z "$VERSION_LINE" ]; then
exit 1 exit 1
fi fi
# Extract just the semantic version (before the + or -) # Extract full version including suffix/build number
VERSION=$(echo "$VERSION_LINE" | sed 's/version: *//' | sed 's/[+\-].*//' | tr -d ' ') VERSION=$(echo "$VERSION_LINE" | sed 's/version: *//' | tr -d ' ')
# Validate version format # Validate version format (X.Y.Z with optional +build or -suffix)
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-+][a-zA-Z0-9]+)?$ ]]; then
echo "❌ Error: Invalid version format in pubspec.yaml: $VERSION" >&2 echo "❌ Error: Invalid version format in pubspec.yaml: $VERSION" >&2
echo "Expected format: X.Y.Z (e.g., 0.1.0)" >&2 echo "Expected format: X.Y.Z, X.Y.Z+build, or X.Y.Z-suffix (e.g., 0.1.0, 0.1.0+12, 0.1.0-m3)" >&2
exit 1 exit 1
fi fi

View File

@@ -45,7 +45,7 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: <EFBFBD> Make scripts executable - name: 🏃🏾‍♂️ Make scripts executable
run: | run: |
chmod +x .github/scripts/*.sh chmod +x .github/scripts/*.sh
echo "✅ Scripts are now executable" echo "✅ Scripts are now executable"
@@ -165,8 +165,6 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '20' node-version: '20'
cache: 'npm'
cache-dependency-path: 'backend/*/package-lock.json'
- name: 🔥 Install Firebase CLI - name: 🔥 Install Firebase CLI
run: | run: |