@@ -20,33 +20,43 @@ jobs:
20
20
with :
21
21
ref : ${{ github.event.inputs.commit_id }}
22
22
- name : Configure git identity
23
+ env :
24
+ ACTOR : ${{ github.actor }}
23
25
run : |
24
- git config --global user.name ${{ github.actor }}
25
- git config --global user.email ${{ github.actor }} @users.noreply.github.com
26
+ git config --global user.name "$ACTOR"
27
+ git config --global user.email "$ACTOR" @users.noreply.github.com
26
28
- name : create a new branch that references commit id
27
- run :
28
- git checkout -b ${{ github.event.inputs.version_number }} ${{
29
- github.event.inputs.commit_id }}
29
+ env :
30
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
31
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
32
+ run : git checkout -b "$VERSION_NUMBER" "$COMMIT_ID"
30
33
- name : Generate SBOM
31
34
uses : FreeRTOS/CI-CD-Github-Actions/sbom-generator@main
32
35
with :
33
36
repo_path : ./
34
37
source_path : ./source
35
38
- name : commit SBOM file
39
+ env :
40
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
36
41
run : |
37
42
git add .
38
43
git commit -m 'Update SBOM'
39
- git push -u origin ${{ github.event.inputs.version_number }}
44
+ git push -u origin "$VERSION_NUMBER"
40
45
- name : Tag Commit and Push to remote
46
+ env :
47
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
41
48
run : |
42
- git tag ${{ github.event.inputs.version_number }} -a -m "FreeRTOS-Cellular-Interface Library ${{ github.event.inputs.version_number }} "
49
+ git tag "$VERSION_NUMBER" -a -m "FreeRTOS-Cellular-Interface Library $VERSION_NUMBER "
43
50
git push origin --tags
44
51
- name : Verify tag on remote
52
+ env :
53
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
54
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
45
55
run : |
46
- git tag -d ${{ github.event.inputs.version_number }}
56
+ git tag -d "$VERSION_NUMBER"
47
57
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 }}
58
+ git checkout tags/"$VERSION_NUMBER"
59
+ git diff "$COMMIT_ID" tags/"$VERSION_NUMBER"
50
60
create-zip :
51
61
needs : tag-commit
52
62
name : Create ZIP and verify package for release asset.
@@ -65,21 +75,27 @@ jobs:
65
75
cd FreeRTOS-Cellular-Interface
66
76
git submodule update --init --checkout --recursive
67
77
- name : Create ZIP
78
+ env :
79
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
68
80
run : |
69
- zip -r FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }} .zip FreeRTOS-Cellular-Interface -x "*.git*"
81
+ zip -r FreeRTOS-Cellular-Interface-"$VERSION_NUMBER" .zip FreeRTOS-Cellular-Interface -x "*.git*"
70
82
ls ./
71
83
- name : Validate created ZIP
84
+ env :
85
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
72
86
run : |
73
87
mkdir zip-check
74
- mv FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }} .zip zip-check
88
+ mv FreeRTOS-Cellular-Interface-"$VERSION_NUMBER" .zip zip-check
75
89
cd zip-check
76
- unzip FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }}. zip -d FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }}
77
- ls FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }}
78
- diff -r -x "*.git*" FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }} /FreeRTOS-Cellular-Interface/ ../FreeRTOS-Cellular-Interface/
90
+ unzip FreeRTOS-Cellular-Interface-"$VERSION_NUMBER". zip -d FreeRTOS-Cellular-Interface-"$VERSION_NUMBER"
91
+ ls FreeRTOS-Cellular-Interface-"$VERSION_NUMBER"
92
+ diff -r -x "*.git*" FreeRTOS-Cellular-Interface-"$VERSION_NUMBER" /FreeRTOS-Cellular-Interface/ ../FreeRTOS-Cellular-Interface/
79
93
cd ../
80
94
- name : Build
95
+ env :
96
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
81
97
run : |
82
- cd zip-check/FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }} /FreeRTOS-Cellular-Interface
98
+ cd zip-check/FreeRTOS-Cellular-Interface-"$VERSION_NUMBER" /FreeRTOS-Cellular-Interface
83
99
sudo apt-get install -y lcov
84
100
cmake -S test -B build/ \
85
101
-G "Unix Makefiles" \
@@ -88,8 +104,10 @@ jobs:
88
104
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG'
89
105
make -C build/ all
90
106
- name : Test
107
+ env :
108
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
91
109
run : |
92
- cd zip-check/FreeRTOS-Cellular-Interface-${{ github.event.inputs.version_number }} /FreeRTOS-Cellular-Interface/build/
110
+ cd zip-check/FreeRTOS-Cellular-Interface-"$VERSION_NUMBER" /FreeRTOS-Cellular-Interface/build/
93
111
ctest -E system --output-on-failure
94
112
cd ..
95
113
- name : Create artifact of ZIP
0 commit comments