-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.28 KB
/
build_check.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
51
52
---
name: Build Check
on:
push:
branches-ignore:
- master
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
contents: write
jobs:
build-check:
strategy:
matrix:
go-version: [1.22.0]
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Version
id: version
run: echo "version=$(cat ./VERSION)" >> $GITHUB_OUTPUT
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Dependencies
run: go get .
- name: Make Artifact Directory
run: mkdir -p ./bin
# Compile Binaries
- name: Build Linux ARM64 Artifact
run: GOOS=linux GOOARCH=arm64 go build -o ./bin/s3packer-linux-arm64 .
- name: Build Linux AMD64 Artifact
run: GOOS=linux GOOARCH=amd64 go build -o ./bin/s3packer-linux-amd64 .
- name: Build MacOS ARM64 Artifact
run: GOOS=darwin GOOARCH=arm64 go build -o ./bin/s3packer-mac-arm64 .
- name: Build MacOS AMD64 Artifact
run: GOOS=darwin GOOARCH=amd64 go build -o ./bin/s3packer-mac-amd64 .