-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 940 Bytes
/
release.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
name: Build and Release
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux]
goarch: [amd64, arm64]
include:
- goos: linux
goarch: amd64
ext: ""
- goos: linux
goarch: arm64
ext: ""
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build binary
run: |
mkdir -p bin
go get .
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o bin/ssm-go-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }} main.go
- name: Upload binaries to release
uses: softprops/action-gh-release@v1
with:
files: bin/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}