Skip to content

Commit 4683229

Browse files
committed
Tidy workflow
1 parent 9c89e9f commit 4683229

File tree

1 file changed

+24
-13
lines changed

1 file changed

+24
-13
lines changed

.github/workflows/build-test-all.yml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- name: Get version
14-
id: get-version
13+
- name: Show version
1514
run: echo "This is a release build for v${GITHUB_REF/refs\/tags\/v/}"
1615

1716
build:
@@ -97,35 +96,47 @@ jobs:
9796

9897
steps:
9998
- 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/}"
102103
- uses: actions/checkout@v1
103104
- name: Check release notes exist
104105
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
107112
- name: Get vhdl_lang linux
108113
uses: actions/download-artifact@v1
109114
with:
110115
name: vhdl_lang-x86_64-unknown-linux-gnu
111116
- name: Check vhdl_lang version
112117
run: |
113-
echo Checking version matches tag \"${GITHUB_REF:11}\"
114118
chmod u+x vhdl_lang-x86_64-unknown-linux-gnu/bin/vhdl_lang
115119
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
118126
- name: Get vhdl_ls linux
119127
uses: actions/download-artifact@v1
120128
with:
121129
name: vhdl_ls-x86_64-unknown-linux-gnu
122130
- name: Check vhdl_ls version
123131
run: |
124-
echo Checking version matches tag \"${GITHUB_REF:11}\"
125132
chmod u+x vhdl_ls-x86_64-unknown-linux-gnu/bin/vhdl_ls
126133
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
129140
- name: Get vhdl_lang windows
130141
uses: actions/download-artifact@v1
131142
with:
@@ -145,5 +156,5 @@ jobs:
145156
with:
146157
draft: false
147158
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"
149160
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)