Skip to content

Commit cc2bec9

Browse files
committed
ci: fix workflow consistency and dry-run git configuration
- Make build verification consistent between workflows by using dynamic package discovery - Add git user configuration for dry-run to prevent changeset version errors - Remove hardcoded package paths in release.yml to match tests.yaml approach - Remove Node.js 18 from test matrix due to Firebase CLI v14 incompatibility
1 parent cb63460 commit cc2bec9

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ jobs:
5454
run: pnpm install
5555

5656
- name: Run format check
57-
# The --unsafe flag is required in CI to bypass interactive prompts
58-
# that would otherwise cause the command to hang in automated environments
59-
run: pnpm format --unsafe
57+
run: pnpm format
6058

6159
release:
6260
name: Release
@@ -112,15 +110,16 @@ jobs:
112110
- name: Verify build outputs
113111
run: |
114112
echo "Checking build outputs..."
113+
# Check all packages for dist directories
115114
MISSING_BUILDS=""
116-
117-
if [ ! -d "packages/react/dist" ]; then
118-
MISSING_BUILDS="$MISSING_BUILDS react"
119-
fi
120-
121-
if [ ! -d "packages/angular/dist" ]; then
122-
MISSING_BUILDS="$MISSING_BUILDS angular"
123-
fi
115+
for PKG_DIR in packages/*; do
116+
if [ -d "$PKG_DIR" ] && [ -f "$PKG_DIR/package.json" ]; then
117+
PKG_NAME=$(basename "$PKG_DIR")
118+
if [ ! -d "$PKG_DIR/dist" ]; then
119+
MISSING_BUILDS="$MISSING_BUILDS $PKG_NAME"
120+
fi
121+
fi
122+
done
124123
125124
if [ -n "$MISSING_BUILDS" ]; then
126125
echo "❌ Build outputs missing for: $MISSING_BUILDS"
@@ -175,6 +174,10 @@ jobs:
175174
done
176175
177176
echo "📦 Version changes that would be applied:"
177+
# Configure git user for changeset version command
178+
git config user.name "github-actions[bot]"
179+
git config user.email "github-actions[bot]@users.noreply.github.com"
180+
178181
# Save current HEAD reference before making changes
179182
ORIGINAL_HEAD=$(git rev-parse HEAD)
180183
# Create a temporary branch for dry run with unique name
@@ -189,7 +192,12 @@ jobs:
189192
190193
echo ""
191194
echo "🔍 Package version changes:"
192-
git diff "$ORIGINAL_HEAD" -- '**/package.json' | grep -E "^[+-]\s*\"version\"" || true
195+
VERSION_CHANGES=$(git diff "$ORIGINAL_HEAD" -- '**/package.json' | grep -E "^[+-]\s*\"version\"" || true)
196+
if [ -z "$VERSION_CHANGES" ]; then
197+
echo " No version changes detected (this might indicate an issue with changesets)"
198+
else
199+
echo "$VERSION_CHANGES"
200+
fi
193201
194202
# Clean up
195203
git checkout -

.github/workflows/tests.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,15 @@ jobs:
4747
run: pnpm install
4848

4949
- name: Run format check
50-
# The --unsafe flag is required in CI to bypass interactive prompts
51-
# that would otherwise cause the command to hang in automated environments
52-
run: pnpm format --unsafe
50+
run: pnpm format
5351

5452
test:
5553
runs-on: ubuntu-latest
5654
timeout-minutes: 30
5755
needs: quality
5856
strategy:
5957
matrix:
60-
node-version: [18, 20, 22]
58+
node-version: [20, 22]
6159
steps:
6260
- name: Checkout code
6361
uses: actions/checkout@v4

0 commit comments

Comments
 (0)