Skip to content

ci: add ci/cd process #2

ci: add ci/cd process

ci: add ci/cd process #2

Workflow file for this run

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
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.20
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}
- name: Authenticate with GitHub
run: echo "//github.com/:machine-token:${{ secrets.GITHUB_TOKEN }}" > ~/.netrc
- name: Compile
run: |
go mod download
cd cmd
go build .
- uses: actions/upload-artifact@v3
with:
name: ethereum-api ${{ matrix.targetos }} ${{ matrix.arch }}
path: cmd/ethereum-api