10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
- - name : Get version
14
- id : get-version
13
+ - name : Show version
15
14
run : echo "This is a release build for v${GITHUB_REF/refs\/tags\/v/}"
16
15
17
16
build :
@@ -97,35 +96,47 @@ jobs:
97
96
98
97
steps :
99
98
- name : Get version
100
- id : get-version
101
- run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
99
+ id : v
100
+ run : |
101
+ echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
102
+ echo "Version is v${GITHUB_REF/refs\/tags\/v/}"
102
103
- uses : actions/checkout@v1
103
104
- name : Check release notes exist
104
105
run : |
105
- echo "Checking for release notes file at release_notes/v${{ steps.get-version.outputs.VERSION }}.md"
106
- [ -f release_notes/v${{ steps.get-version.outputs.VERSION }}.md ] && echo "Release notes found" || { echo "Release notes not found"; exit 1; }
106
+ if [ -f release_notes/v${{ steps.v.outputs.v }}.md ] then
107
+ echo "Release notes found at release_notes/v${{ steps.v.outputs.v }}.md"
108
+ else
109
+ echo "Release notes not found at release_notes/v${{ steps.v.outputs.v }}.md"
110
+ exit 1
111
+ fi
107
112
- name : Get vhdl_lang linux
108
113
uses : actions/download-artifact@v1
109
114
with :
110
115
name : vhdl_lang-x86_64-unknown-linux-gnu
111
116
- name : Check vhdl_lang version
112
117
run : |
113
- echo Checking version matches tag \"${GITHUB_REF:11}\"
114
118
chmod u+x vhdl_lang-x86_64-unknown-linux-gnu/bin/vhdl_lang
115
119
version_string=$(vhdl_lang-x86_64-unknown-linux-gnu/bin/vhdl_lang --version)
116
- echo Version string is \"$version_string\"
117
- [ "$version_string" != "vhdl_lang ${GITHUB_REF:11}" ] && { echo "Version string mismatch"; exit 1; } || echo "Version string matched"
120
+ if [ "$version_string" != "vhdl_lang ${{ steps.v.outputs.v }}" ] then
121
+ echo "Version string mismatch (\"$version_string\" != \"vhdl_lang ${{ steps.v.outputs.v }}\""
122
+ exit 1
123
+ else
124
+ echo "Version string matched"
125
+ fi
118
126
- name : Get vhdl_ls linux
119
127
uses : actions/download-artifact@v1
120
128
with :
121
129
name : vhdl_ls-x86_64-unknown-linux-gnu
122
130
- name : Check vhdl_ls version
123
131
run : |
124
- echo Checking version matches tag \"${GITHUB_REF:11}\"
125
132
chmod u+x vhdl_ls-x86_64-unknown-linux-gnu/bin/vhdl_ls
126
133
version_string=$(vhdl_ls-x86_64-unknown-linux-gnu/bin/vhdl_ls --version)
127
- echo Version string is \"$version_string\"
128
- # [ "$version_string" != "vhdl_ls ${GITHUB_REF:11}" ] && { echo "Version string mismatch"; exit 1; } || echo "Version string matched"
134
+ if [ "$version_string" != "vhdl_ls ${{ steps.v.outputs.v }}" ] then
135
+ echo "Version string mismatch (\"$version_string\" != \"vhdl_lang ${{ steps.v.outputs.v }}\""
136
+ # exit 1
137
+ else
138
+ echo "Version string matched"
139
+ fi
129
140
- name : Get vhdl_lang windows
130
141
uses : actions/download-artifact@v1
131
142
with :
@@ -145,5 +156,5 @@ jobs:
145
156
with :
146
157
draft : false
147
158
artifacts : " vhdl_lang-x86_64-unknown-linux-gnu.zip,vhdl_ls-x86_64-unknown-linux-gnu.zip,vhdl_lang-x86_64-pc-windows-msvc.zip,vhdl_ls-x86_64-pc-windows-msvc.zip"
148
- bodyFile : " release_notes/v${{ steps.get-version .outputs.VERSION }}.md"
159
+ bodyFile : " release_notes/v${{ steps.v .outputs.v }}.md"
149
160
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments