Skip to content

Commit

Permalink
Merge pull request #19 from vania-pooh/master
Browse files Browse the repository at this point in the history
Added build workflow
  • Loading branch information
vania-pooh authored Aug 16, 2020
2 parents 389e329 + 7488be8 commit 4ca0222
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: build

on:
push:
branches:
- master

jobs:
golang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Golang
uses: actions/setup-go@v2
with:
go-version: 1.15.x

- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: ci/test.sh

- name: Build
run: ci/build.sh
5 changes: 5 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

export GO111MODULE="on"
go get -u github.com/mitchellh/gox # cross compile
gox -os "linux darwin windows" -arch "amd64" -osarch="windows/386" -output "dist/{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.buildStamp=`date -u '+%Y-%m-%d_%I:%M:%S%p'` -X main.gitRevision=`git describe --tags || git rev-parse HEAD` -s -w"

0 comments on commit 4ca0222

Please sign in to comment.