From 558a06403ff0eb01e8f0f07eb1223199a551e4a4 Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 28 Jun 2020 12:55:48 +0200 Subject: [PATCH] Added Github Actions workflow to build ChopChop (#11) --- .github/workflows/build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1d6f834 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +on: push +name: Build ChopChop +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: 1.14.x + - name: Checkout code + uses: actions/checkout@v2 + - name: Install gox + run: go get github.com/mitchellh/gox + - name: Build using gox + run: gox -ldflags "-X main.Version=$BUILD_VERSION -X main.BuildDate=$BUILD_DATE" -output "dist/ChopChop_{{.OS}}_{{.Arch}}" + - name: Release + uses: fnkr/github-action-ghr@v1 + if: startsWith(github.ref, 'refs/tags/') + env: + GHR_COMPRESS: xz + GHR_PATH: dist/ + GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }} \ No newline at end of file