generated from d2iq-archive/golang-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (40 loc) · 1.15 KB
/
checks-macos.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
# Copyright 2021-2023 D2iQ, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
name: build-on-macos
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
jobs:
build-and-run:
runs-on: macos-13
defaults:
run:
shell: bash
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install devbox
uses: jetpack-io/[email protected]
with:
enable-cache: true
env:
NIX_USER_COUNT: 4
- name: Build
run: |
devbox run -- \
make GORELEASER_FLAGS='--config=<(env GOOS=$$(go env GOOS) GOARCH=$$(go env GOARCH) gojq --yaml-input --yaml-output \'del(.builds[0].goarch) | del(.builds[0].goos) | .builds[0].targets|=([env.GOOS+"_"+env.GOARCH] | unique | map(. | sub("_amd64";"_amd64_v1")))\' .goreleaser.yml) --skip=validate,publish' release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run binary
run: |
./dist/mindthegap_darwin_amd64_v1/mindthegap