@@ -24,21 +24,31 @@ jobs:
24
24
with :
25
25
ref : ${{ github.event.inputs.commit_id }}
26
26
- name : Configure git identity
27
+ env :
28
+ ACTOR : ${{ github.actor }}
27
29
run : |
28
- git config --global user.name ${{ github.actor }}
29
- git config --global user.email ${{ github.actor }} @users.noreply.github.com
30
+ git config --global user.name "$ACTOR"
31
+ git config --global user.email "$ACTOR" @users.noreply.github.com
30
32
- name : create a new branch that references commit id
31
- run : git checkout -b ${{ github.event.inputs.version_number }} ${{ github.event.inputs.commit_id }}
33
+ env :
34
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
35
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
36
+ run : git checkout -b "$VERSION_NUMBER" "$COMMIT_ID"
32
37
- name : Tag Commit and Push to remote
38
+ env :
39
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
33
40
run : |
34
- git tag ${{ github.event.inputs.version_number }} -a -m "Release ${{ github.event.inputs.version_number }} "
41
+ git tag "$VERSION_NUMBER" -a -m "Release $VERSION_NUMBER "
35
42
git push origin --tags
36
43
- name : Verify tag on remote
44
+ env :
45
+ VERSION_NUMBER : ${{ github.event.inputs.version_number }}
46
+ COMMIT_ID : ${{ github.event.inputs.commit_id }}
37
47
run : |
38
- git tag -d ${{ github.event.inputs.version_number }}
48
+ git tag -d "$VERSION_NUMBER"
39
49
git remote update
40
- git checkout tags/${{ github.event.inputs.version_number }}
41
- git diff ${{ github.event.inputs.commit_id }} tags/${{ github.event.inputs.version_number }}
50
+ git checkout tags/"$VERSION_NUMBER"
51
+ git diff "$COMMIT_ID" tags/"$VERSION_NUMBER"
42
52
create-zip :
43
53
needs : tag-commit
44
54
name : Create ZIP and verify package for release asset.
@@ -53,23 +63,29 @@ jobs:
53
63
path : ${{ github.event.repository.name }}
54
64
submodules : recursive
55
65
- name : Checkout disabled submodules
66
+ env :
67
+ REPO_NAME : ${{ github.event.repository.name }}
56
68
run : |
57
- cd ${{ github.event.repository.name }}
69
+ cd "$REPO_NAME"
58
70
git submodule update --init --checkout --recursive
59
71
- name : Create ZIP
72
+ env :
73
+ REPO_NAME : ${{ github.event.repository.name }}
60
74
run : |
61
- zip -r ${{ env.repostiory_zip_name }} ${{ github.event.repository.name }} -x "*.git*"
75
+ zip -r ${{ env.repostiory_zip_name }} "$REPO_NAME" -x "*.git*"
62
76
ls ./
63
77
- name : Validate created ZIP
78
+ env :
79
+ REPO_NAME : ${{ github.event.repository.name }}
64
80
run : |
65
81
mkdir zip-check
66
82
mv ${{ env.repostiory_zip_name }} zip-check
67
83
cd zip-check
68
84
unzip ${{ env.repostiory_zip_name }} -d ${{ env.repository_compressed_name }}
69
85
ls ${{ env.repository_compressed_name }}
70
- diff -r -x "*.git*" ${{ env.repository_compressed_name }}/${{ github.event.repository.name }} / ../${{ github.event.repository.name }} /
86
+ diff -r -x "*.git*" ${{ env.repository_compressed_name }}/"$REPO_NAME" / ../"$REPO_NAME" /
71
87
- name : Create artifact of ZIP
72
- uses : actions/upload-artifact@v2
88
+ uses : actions/upload-artifact@v4
73
89
with :
74
90
name : ${{ env.repostiory_zip_name }}
75
91
path : zip-check/${{ env.repostiory_zip_name }}
0 commit comments