Skip to content

Commit

Permalink
Create github actions pipeline
Browse files Browse the repository at this point in the history
ci: create actions pipeline
  • Loading branch information
danstis committed Feb 7, 2020
1 parent 26850b1 commit 9e8185a
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Go
on: [push]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: use-actions
uses: GitTools/actions@v0.6.2
with:
# Required version in the form of 5.x or exact version like 5.0.0
versionSpec: 5.x

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Run gitversion
run: gitversion /output buildserver

- name: Get dependencies
run: go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo

- name: Build
run: |
goversioninfo -64 -product-version="GITVERSION_SEMVER" -ver-major="$env:GITVERSION_MAJOR" -ver-minor="$env:GITVERSION_MINOR" -ver-patch="$env:GITVERSION_PATCH"
go build -ldflags "-H=windowsgui -X main.Version=GITVERSION_SEMVER" github.com/danstis/toggl-taskbar
- name: Test
run: go vet ./...

- name: Package build
run: |
mkdir ./package
cp ./config.toml.default ./package/config.toml
cp -R ./assets ./package/
cp `ls *.exe *.md LICENSE` ./package/
- name: Zip Release
uses: TheDoctor0/zip-release@v0.2.1
with:
filename: toggl-taskbar.zip
path: ./package/

0 comments on commit 9e8185a

Please sign in to comment.