Skip to content

Commit 3d77b13

Browse files
authored
feat: Update release.yml (#478)
Updates release.yml to: * Build only projects with changed files. * Clean up dist/ folders for deleted projects; TEST ONLY for this PR. TODO: Add the rest of the deletion functionality.
1 parent 6fb7100 commit 3d77b13

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,25 @@ jobs:
6868
echo "Building affected workspaces:"
6969
for workspace in "${AFFECTED_WORKSPACES_ARRAY[@]}"; do
7070
echo " - samples/$workspace"
71+
(cd samples/ && npm run build --workspace=$workspace)
7172
done
7273
73-
- run: npm run build-all
74+
- name: Get Deleted Workspaces
75+
id: get_deleted
76+
run: bash samples/find-deleted-subfolders.sh ${{ github.event.before }}
77+
78+
- name: Remove Output for Deleted Folders
79+
if: steps.get_deleted.outputs.deleted_workspaces != ''
80+
run: |
81+
IFS=$'\n'
82+
DELETED_WORKSPACES_ARRAY=({{ steps.get_deleted.outputs.deleted_workspaces }})
83+
echo: "Removing deleted project output:"
84+
for workspace in "${DELETED_WORKSPACES_ARRAY[@]}"; do
85+
echo " - samples/$workspace"
86+
done
87+
88+
- name: Generate Index
89+
run: bash samples/generate-index.sh
7490

7591
- uses: google-github-actions/auth@v1
7692
with:

0 commit comments

Comments
 (0)