Skip to content

Commit 356427a

Browse files
committed
fix(workflow): correct directory exclusion patterns in release workflow
- Replace incorrect ! -path . with ! -path "." to properly exclude current directory - Fix bash command to use quoted directory argument in cd command for safety - Ensure directory detection and tag extraction steps work as intended - Improve robustness of project detection in release.yml GitHub Actions workflow
1 parent fb8f7d1 commit 356427a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Detect changed projects
4242
id: detect
4343
run: |
44-
PROJECTS=$(find . -maxdepth 1 -type d ! -path . ! -path "./.github*" ! -path "./.vscode*" ! -path "./scripts*" ! -path "./demo*" | while read d; do
44+
PROJECTS=$(find . -maxdepth 1 -type d ! -path "." ! -path "./.github*" ! -path "./.vscode*" ! -path "./scripts*" ! -path "./demo*" | while read d; do
4545
if [ -f "$d/package.json" ]; then echo "$(basename "$d")"; fi
4646
done)
4747

@@ -203,7 +203,7 @@ jobs:
203203

204204
TAGS="${{ steps.bump_versions.outputs.tags }}"
205205
if [ -z "$TAGS" ] && [ "${{ steps.need_ci.outputs.force_run }}" = "true" ]; then
206-
TAGS=$(find . -maxdepth 1 -type d ! -path . ! -path "./.github*" ! -path "./.vscode*" ! -path "./scripts*" ! -path "./demo*" -exec bash -c 'cd {} && if [ -f package.json ]; then NAME=$(jq -r .name package.json); VER=$(jq -r .version package.json); echo "$(basename "$PWD")@$VER"; fi' \;)
206+
TAGS=$(find . -maxdepth 1 -type d ! -path "." ! -path "./.github*" ! -path "./.vscode*" ! -path "./scripts*" ! -path "./demo*" -exec bash -c 'cd "{}" && if [ -f package.json ]; then NAME=$(jq -r .name package.json); VER=$(jq -r .version package.json); echo "$(basename "$PWD")@$VER"; fi' \;)
207207
fi
208208

209209
for TAG in $TAGS; do

0 commit comments

Comments
 (0)