Skip to content

Commit

Permalink
Fixup build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeuw committed Dec 20, 2020
1 parent 0473d71 commit 298e624
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ jobs:
- name: Build
run: |
export PATH=${PATH}:`go env GOPATH`/bin
v=${{ github.ref }} ./release.sh
v=${GITHUB_REF#refs/*/} ./release.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: release/*.*
files: release/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

go get github.com/mitchellh/gox

mkdir -p release
Expand All @@ -21,9 +23,11 @@ CGO_ENABLED=0 gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarc
CGO_ENABLED=0 GOOS="linux" GOARCH="mips" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mips_softfloat-"${v}"
CGO_ENABLED=0 GOOS="linux" GOARCH="mipsle" GOMIPS="softfloat" go build -ldflags "-X main.version=${v}" -o ck-client-linux-mipsle_softfloat-"${v}"
mv ck-client-* ../../release
popd

os="linux"
arch="amd64 386 arm arm64"
pushd ../ck-server || exit 1
pushd cmd/ck-server || exit 1
CGO_ENABLED=0 gox -ldflags "-X main.version=${v}" -os="$os" -arch="$arch" -osarch="$osarch" -output="$output"
mv ck-server-* ../../release
popd

0 comments on commit 298e624

Please sign in to comment.