-
Notifications
You must be signed in to change notification settings - Fork 70
51 lines (49 loc) · 1.24 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build All Architectures
on:
workflow_dispatch:
push:
branches:
- 'master'
paths-ignore:
- '.idea/..'
- 'docs/**'
pull_request:
paths-ignore:
- '.idea/..'
- 'docs/**'
jobs:
build-all:
name: Build for all architectures
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run build script
run: ./scripts/build.sh -a amd64,386,arm64,arm
- name: Upload to GitHub Artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: ./build/*
- name: Upload to GitHub Releases
if: github.event_name != 'pull_request' && github.ref_name == 'master'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "continuous"
prerelease: true
title: "Continuous Build"
files: |
./build/*
#