Skip to content

Commit 44254a0

Browse files
committed
[CI] Add release job to build workflow
Signed-off-by: AeroStun <24841307+AeroStun@users.noreply.github.com>
1 parent 7d560f5 commit 44254a0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/build.yml

+25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
name: Build
22
on: [push, pull_request]
33
jobs:
4+
make-release:
5+
name: Publish release
6+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
7+
needs: [ build-linux, build-macos, build-windows ]
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Download all build artifacts
12+
uses: actions/download-artifact@v2
13+
- name: Create Release
14+
shell: bash
15+
run: |
16+
tag_name="${GITHUB_REF##*/}"
17+
mkdir release
18+
mv $(find . -mindepth 1 -maxdepth 2 -type d -name 'ardpre-*' -printf '%p/* ') release/
19+
cd release
20+
mkdir hashes
21+
for alg in md5 sha1 sha224 sha256 sha384 sha512; do
22+
"${alg}sum" $(find . -maxdepth 1 -type f | sed 's/.\///') > hashes/$alg.txt
23+
done
24+
mv hashes/* ./
25+
rmdir hashes
26+
hub release create $(find . -type f -printf "-a %p ") -m "arduino-prelude $tag_name" "$tag_name"
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
429
build-linux:
530
name: arduino-prelude - Linux
631
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)