@@ -23,15 +23,20 @@ jobs:
2323 run : |
2424 git config --global user.name "Release Workflow"
2525 - name : Tag Commit and Push to remote
26+ env :
27+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
2628 run : |
27- git tag ${{ github.event.inputs.version_number }} -a -m "AWS IoT Device SDK for Embedded C version ${{ github.event.inputs.version_number }} "
29+ git tag "$VERSION_NUMBER" -a -m "AWS IoT Device SDK for Embedded C version $VERSION_NUMBER "
2830 git push origin --tags
2931 - name : Verify tag on remote
32+ env :
33+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
34+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
3035 run : |
31- git tag -d ${{ github.event.inputs.version_number }}
36+ git tag -d "$VERSION_NUMBER"
3237 git remote update
33- git checkout tags/${{ github.event.inputs.version_number }}
34- git diff ${{ github.event.inputs.commit_id }} tags/${{ github.event.inputs.version_number }}
38+ git checkout tags/"$VERSION_NUMBER"
39+ git diff "$COMMIT_ID" tags/"$VERSION_NUMBER"
3540 create-zip :
3641 needs : tag-commit
3742 name : Create ZIP and verify package for release asset.
@@ -54,18 +59,22 @@ jobs:
5459 zip -r aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip aws-iot-device-sdk-embedded-C -x "*.git*"
5560 ls ./
5661 - name : Validate created ZIP
62+ env :
63+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
5764 run : |
5865 mkdir zip-check
59- mv aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} .zip zip-check
66+ mv aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" .zip zip-check
6067 cd zip-check
61- unzip aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}. zip -d aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}
62- ls aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}
63- diff -r -x "*.git*" aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} /aws-iot-device-sdk-embedded-C/ ../aws-iot-device-sdk-embedded-C/
68+ unzip aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER". zip -d aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER"
69+ ls aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER"
70+ diff -r -x "*.git*" aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/ ../aws-iot-device-sdk-embedded-C/
6471 cd ../
6572 - name : Build Check Demos
73+ env :
74+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
6675 run : |
6776 sudo apt-get install -y libmosquitto-dev
68- cd zip-check/aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} /aws-iot-device-sdk-embedded-C/
77+ cd zip-check/aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/
6978 cmake -S . -B build/ \
7079 -G "Unix Makefiles" \
7180 -DBUILD_DEMOS=1 \
8998 make -C build/ help | grep demo | tr -d '. ' | xargs make -C build/ -j8
9099 make -C demos/jobs/jobs_demo_mosquitto -j8
91100 - name : Build Check Tests
101+ env :
102+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
92103 run : |
93- cd zip-check/aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} /aws-iot-device-sdk-embedded-C/
104+ cd zip-check/aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/
94105 rm -rf ./build
95106 cmake -S . -B build/ \
96107 -G "Unix Makefiles" \
@@ -105,8 +116,10 @@ jobs:
105116 -DCLIENT_IDENTIFIER="ci-identifier"
106117 make -C build/ all -j8
107118 - name : Run Unit Tests
119+ env :
120+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
108121 run : |
109- cd zip-check/aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} /aws-iot-device-sdk-embedded-C/build/
122+ cd zip-check/aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/build/
110123 ctest -E system --output-on-failure
111124 cd ..
112125 - name : Create artifact of ZIP
0 commit comments