Skip to content

Commit

Permalink
ci: only build linux amd64
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
zhaojh329 committed Sep 15, 2021
1 parent 59b1d33 commit c9eb0af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
target: [ linux.amd64, linux.arm64, darwin.amd64, windows.amd64 ]
target: [ linux.amd64 ]
steps:
- uses: actions/checkout@v2
with:
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@ jobs:
mv rttys-linux-amd64 rttys-linux-amd64-$version
tar zcf rttys-linux-amd64-$version.tar.gz rttys-linux-amd64-$version
./build.sh linux arm64
mv rttys-linux-arm64 rttys-linux-arm64-$version
tar zcf rttys-linux-arm64-$version.tar.gz rttys-linux-arm64-$version
./build.sh darwin amd64
mv rttys-darwin-amd64 rttys-darwin-amd64-$version
tar zcf rttys-darwin-amd64-$version.tar.gz rttys-darwin-amd64-$version
./build.sh windows amd64
mv rttys-windows-amd64 rttys-windows-amd64-$version
tar zcf rttys-windows-amd64-$version.tar.gz rttys-windows-amd64-$version
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ generate() {
local dir="rttys-$os-$arch"
local bin="rttys"

rm -rf $dir
mkdir $dir
cp rttys.conf $dir

[ "$os" = "windows" ] && {
bin="rttys.exe"
}

GOOS=$os GOARCH=$arch CGO_ENABLED=0 go build -ldflags="-s -w -X $VersionPath.gitCommit=$GitCommit -X $VersionPath.buildTime=$BuildTime" -o $dir/$bin
GOOS=$os GOARCH=$arch go build -ldflags="-s -w -X $VersionPath.gitCommit=$GitCommit -X $VersionPath.buildTime=$BuildTime" -o $dir/$bin
}

generate $1 $2

0 comments on commit c9eb0af

Please sign in to comment.