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:
10
.github/scripts/extract-version.sh
vendored
10
.github/scripts/extract-version.sh
vendored
@@ -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
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/product-release.yml
vendored
4
.github/workflows/product-release.yml
vendored
@@ -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: |
|
||||||
|
|||||||
Reference in New Issue
Block a user