@@ -16,22 +16,27 @@ jobs:
1616 runs-on : ubuntu-20.04
1717 steps :
1818 - name : Checkout code
19- uses : actions/checkout@v2
19+ uses : actions/checkout@v4
2020 with :
2121 ref : ${{ github.event.inputs.commit_id }}
2222 - name : Configure git identity
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.
4045 - name : Install ZIP tools
4146 run : sudo apt-get install zip unzip
4247 - name : Checkout code
43- uses : actions/checkout@v2
48+ uses : actions/checkout@v4
4449 with :
4550 ref : ${{ github.event.inputs.commit_id }}
4651 path : aws-iot-device-sdk-embedded-C
@@ -50,22 +55,28 @@ jobs:
5055 cd aws-iot-device-sdk-embedded-C
5156 git submodule update --init --checkout --recursive
5257 - name : Create ZIP
58+ env :
59+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
5360 run : |
54- zip -r aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} .zip aws-iot-device-sdk-embedded-C -x "*.git*"
61+ zip -r aws-iot-device-sdk-embedded-C-$"VERSION_NUMBER" .zip aws-iot-device-sdk-embedded-C -x "*.git*"
5562 ls ./
5663 - name : Validate created ZIP
64+ env :
65+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
5766 run : |
5867 mkdir zip-check
59- mv aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} .zip zip-check
68+ mv aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" .zip zip-check
6069 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/
70+ unzip aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER". zip -d aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER"
71+ ls aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER"
72+ diff -r -x "*.git*" aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/ ../aws-iot-device-sdk-embedded-C/
6473 cd ../
6574 - name : Build Check Demos
75+ env :
76+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
6677 run : |
6778 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/
79+ cd zip-check/aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/
6980 cmake -S . -B build/ \
7081 -G "Unix Makefiles" \
7182 -DBUILD_DEMOS=1 \
@@ -89,8 +100,10 @@ jobs:
89100 make -C build/ help | grep demo | tr -d '. ' | xargs make -C build/ -j8
90101 make -C demos/jobs/jobs_demo_mosquitto -j8
91102 - name : Build Check Tests
103+ env :
104+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
92105 run : |
93- cd zip-check/aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} /aws-iot-device-sdk-embedded-C/
106+ cd zip-check/aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/
94107 rm -rf ./build
95108 cmake -S . -B build/ \
96109 -G "Unix Makefiles" \
@@ -105,8 +118,10 @@ jobs:
105118 -DCLIENT_IDENTIFIER="ci-identifier"
106119 make -C build/ all -j8
107120 - name : Run Unit Tests
121+ env :
122+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
108123 run : |
109- cd zip-check/aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }} /aws-iot-device-sdk-embedded-C/build/
124+ cd zip-check/aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER" /aws-iot-device-sdk-embedded-C/build/
110125 ctest -E system --output-on-failure
111126 cd ..
112127 - name : Create artifact of ZIP
0 commit comments