-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1 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
name: Build
on:
pull_request:
push:
branches:
- main
# This workflow makes amd64 and arm64 binaries for macOS and Linux.
jobs:
build:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/ojo-network/indexer
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
strategy:
matrix:
arch: [amd64, arm64]
targetos: [darwin, linux]
name: ethereum-api ${{ matrix.arch }} for ${{ matrix.targetos }}
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: 1.19
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}
- run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- name: Compile
run: |
go mod download
go build .
- uses: actions/upload-artifact@v3
with:
name: ethereum-api ${{ matrix.targetos }} ${{ matrix.arch }}
path: ethereum-api