-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (47 loc) · 1.21 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: Main
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Build arm64
env:
GOOS: linux
GOARCH: arm64
CGO_ENABLED: 0
run: go build -ldflags="-s -w" -o vallox-mqtt/vallox-mqtt-arm64 .
- name: Build arm
env:
GOOS: linux
GOARCH: arm
CGO_ENABLED: 0
run: go build -ldflags="-s -w" -o vallox-mqtt/vallox-mqtt-arm .
- name: Build amd64
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
run: go build -ldflags="-s -w" -o vallox-mqtt/vallox-mqtt-amd64 .
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'vallox-mqtt-all-archs.zip'
path: 'vallox-mqtt'
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
vallox-mqtt-all-archs.zip
draft: true
generate_release_notes: true