Skip to content

Commit

Permalink
Add Go build and release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: James Taylor <[email protected]>
  • Loading branch information
jt-nti committed May 4, 2022
1 parent fb0d51a commit b339eba
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Go

on:
push:
branches: [ main ]
tags: [ v** ]
pull_request:
branches: [ main ]

jobs:

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]

steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Package
run: |
go build -v ./cmd/build
go build -v ./cmd/detect
go build -v ./cmd/release
go build -v ./cmd/run
tar -czvf fabric-builder-k8s-${RUNNER_OS}-${RUNNER_ARCH}.tgz build detect release run
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: fabric-builder-k8s-*.tgz

0 comments on commit b339eba

Please sign in to comment.