-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (48 loc) · 1.33 KB
/
build.yml
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
name: Build and Release
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
required: true
default: 'main'
release:
types: [created]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: [1.21.5]
include:
- os: ubuntu-latest
goos: linux
goarch: amd64
name: ubuntu
extension: ""
- os: macos-latest
goos: darwin
goarch: amd64
name: mac
extension: ""
- os: windows-latest
goos: windows
goarch: amd64
name: win
extension: ".exe"
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: |
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v -o sbstck-dl-${{ matrix.name }}-${{ matrix.goarch }}${{ matrix.extension }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sbstck-dl-${{ matrix.name }}-${{ matrix.goarch }}
path: sbstck-dl-${{ matrix.name }}-${{ matrix.goarch }}${{ matrix.extension }}