Skip to content

Commit 9562467

Browse files
committed
Added gh-action workflow build
1 parent 2e42b63 commit 9562467

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.github/workflows/test.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: test
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
create-test-artifacts:
9+
runs-on: ubuntu-20.04
10+
11+
steps:
12+
- name: checkout
13+
uses: actions/checkout@v1
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Install Taskfile
18+
uses: arduino/actions/setup-taskfile@master
19+
with:
20+
repo-token: ${{ secrets.GITHUB_TOKEN }}
21+
version: 3.x
22+
23+
- name: Build
24+
run: |
25+
PACKAGE_NAME_PREFIX="${{ github.workflow }}"
26+
if [ "${{ github.event_name }}" = "pull_request" ]; then
27+
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.event.number }}"
28+
fi
29+
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}-"
30+
export PACKAGE_NAME_PREFIX
31+
task dist:all
32+
33+
# Uploads all architectures as separate artifacts
34+
- name: Upload Linux 32 bit artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: Linux_32bit
38+
path: dist/*Linux_32bit.tar.gz
39+
40+
- name: Upload Linux 64 bit artifact
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: Linux_64bit
44+
path: dist/*Linux_64bit.tar.gz
45+
46+
- name: Upload Windows 32 bit artifact
47+
uses: actions/upload-artifact@v2
48+
with:
49+
name: Windows_32bit
50+
path: dist/*Windows_32bit.zip
51+
52+
- name: Upload Windows 64 bit artifact
53+
uses: actions/upload-artifact@v2
54+
with:
55+
name: Windows_64bit
56+
path: dist/*Windows_64bit.zip
57+
58+
- name: Upload Linux ARMv6 artifact
59+
uses: actions/upload-artifact@v2
60+
with:
61+
name: Linux_ARMv6
62+
path: dist/*Linux_ARMv6.tar.gz
63+
64+
- name: Upload Linux ARMv7 artifact
65+
uses: actions/upload-artifact@v2
66+
with:
67+
name: Linux_ARMv7
68+
path: dist/*Linux_ARMv7.tar.gz
69+
70+
- name: Upload Linux ARM64 artifact
71+
uses: actions/upload-artifact@v2
72+
with:
73+
name: Linux_ARM64
74+
path: dist/*Linux_ARM64.tar.gz
75+
76+
- name: Upload Linux ARM64 bit artifact
77+
uses: actions/upload-artifact@v2
78+
with:
79+
name: Linux_ARM64
80+
path: dist/*Linux_ARM64.tar.gz
81+
82+
- name: Upload MacOS 64 bit artifact
83+
uses: actions/upload-artifact@v2
84+
with:
85+
name: macOS_64bit
86+
path: dist/*macOS_64bit.tar.gz
87+
88+
- name: Upload checksums
89+
uses: actions/upload-artifact@v2
90+
with:
91+
name: checksums
92+
path: dist/*checksums.txt

0 commit comments

Comments
 (0)