Skip to content

Commit ad2a9fb

Browse files
committed
updated YAML
1 parent 808d14c commit ad2a9fb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/GHCopilotProjects_Zip_Code_Ex7.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,29 @@ jobs:
4949
uses: actions/checkout@v4
5050
- name: Create GHCopilotEx7 SampleApps zip
5151
run: |
52+
# Ensure Downloads directory exists
53+
mkdir -p ./DownloadableCodeProjects/Downloads
54+
55+
# Change to source directory
5256
cd ./DownloadableCodeProjects/standalone-lab-projects/simplify-complex-conditionals
57+
58+
# Check if there are any git-tracked files to zip
59+
if [ -z "$(git ls-files)" ]; then
60+
echo "No git-tracked files found in the source directory"
61+
exit 1
62+
fi
63+
64+
# Remove existing zip file and create new one
5365
rm -f ../../Downloads/GHCopilotEx7LabApps.zip
5466
zip -r -q ../../Downloads/GHCopilotEx7LabApps.zip $(git ls-files)
67+
68+
# Verify zip file was created
69+
if [ ! -f ../../Downloads/GHCopilotEx7LabApps.zip ]; then
70+
echo "Failed to create zip file"
71+
exit 1
72+
fi
73+
74+
echo "Successfully created GHCopilotEx7LabApps.zip"
5575
- name: Commit and push
5676
uses: Endbug/add-and-commit@v7
5777
with:

0 commit comments

Comments
 (0)