24
24
git config --global user.name ${{ github.actor }}
25
25
git config --global user.email ${{ github.actor }}@users.noreply.github.com
26
26
- name : create a new branch that references commit id
27
- run : git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
27
+ env :
28
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
29
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
30
+ run : git checkout -b "$VERSION_NUMBER" "$COMMIT_ID"
28
31
- name : Generate SBOM
29
32
uses : FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
30
33
with :
@@ -38,15 +41,20 @@ jobs:
38
41
git commit -m 'Update SBOM'
39
42
git push -u origin "$VERSION_NUMBER"
40
43
- name : Tag Commit and Push to remote
44
+ env :
45
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
41
46
run : |
42
- git tag ${{ github.event.inputs.version_number }} -a -m "coreHTTP Library ${{ github.event.inputs.version_number }} "
47
+ git tag "$VERSION_NUMBER" -a -m "coreHTTP Library $VERSION_NUMBER "
43
48
git push origin --tags
44
49
- name : Verify tag on remote
50
+ env :
51
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
52
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
45
53
run : |
46
- git tag -d ${{ github.event.inputs.version_number }}
54
+ git tag -d "$VERSION_NUMBER"
47
55
git remote update
48
- git checkout tags/${{ github.event.inputs.version_number }}
49
- git diff ${{ github.event.inputs.commit_id }} tags/${{ github.event.inputs.version_number }}
56
+ git checkout tags/"$VERSION_NUMBER"
57
+ git diff "$COMMIT_ID" tags/"$VERSION_NUMBER"
50
58
create-zip :
51
59
needs : tag-commit
52
60
name : Create ZIP and verify package for release asset.
@@ -71,13 +79,15 @@ jobs:
71
79
zip -r coreHTTP-"$VERSION_NUMBER".zip coreHTTP -x "*.git*"
72
80
ls ./
73
81
- name : Validate created ZIP
82
+ env :
83
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
74
84
run : |
75
85
mkdir zip-check
76
- mv coreHTTP-${{ github.event.inputs.version_number }} .zip zip-check
86
+ mv coreHTTP-"$VERSION_NUMBER" .zip zip-check
77
87
cd zip-check
78
- unzip coreHTTP-${{ github.event.inputs.version_number }}. zip -d coreHTTP-${{ github.event.inputs.version_number }}
79
- ls coreHTTP-${{ github.event.inputs.version_number }}
80
- diff -r -x "*.git*" coreHTTP-${{ github.event.inputs.version_number }} /coreHTTP/ ../coreHTTP/
88
+ unzip coreHTTP-"$VERSION_NUMBER". zip -d coreHTTP-"$VERSION_NUMBER"
89
+ ls coreHTTP-"$VERSION_NUMBER"
90
+ diff -r -x "*.git*" coreHTTP-"$VERSION_NUMBER" /coreHTTP/ ../coreHTTP/
81
91
cd ../
82
92
- name : Build
83
93
env :
@@ -91,8 +101,10 @@ jobs:
91
101
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG'
92
102
make -C build/ all
93
103
- name : Test
104
+ env :
105
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
94
106
run : |
95
- cd zip-check/coreHTTP-${{ github.event.inputs.version_number }} /coreHTTP/build/
107
+ cd zip-check/coreHTTP-"$VERSION_NUMBER" /coreHTTP/build/
96
108
ctest -E system --output-on-failure
97
109
cd ..
98
110
- name : Create artifact of ZIP
0 commit comments