Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaojian-hong committed Oct 8, 2022
1 parent 9eb396c commit 4fee5d6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
default: 'warning'
jobs:
build-linux-amd64:
name: Build Linux binaries
name: Build Linux x86-64 binary
runs-on: ubuntu-latest
env:
GOVER: 1.19
Expand All @@ -33,7 +33,7 @@ jobs:
name: yomo-artifact
path: ./bin/**/*
build-linux-arm64:
name: Build Linux arm64 binaries
name: Build Linux arm64 binary
runs-on: [self-hosted, Linux, ARM64]
env:
GOVER: 1.19
Expand All @@ -57,10 +57,52 @@ jobs:
with:
name: yomo-artifact
path: ./bin/**/*
build-darwin-amd64:
name: Build MacOS x86-64 binary
runs-on: macos-latest
env:
GOVER: 1.19
steps:
- name: Set up Go ${{ env.GOVER }}
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVER }}
- name: Check out code
uses: actions/checkout@v3
- name: Run go mod tidy
run: go mod tidy
- name: build & archive binaries
run: make archive-release-darwin-amd64
- name: upload artifacts
uses: actions/upload-artifact@master
with:
name: yomo-artifact
path: ./bin/**/*
build-windows-amd64:
name: Build Windows x86-64 binary
runs-on: windows-latest
env:
GOVER: 1.19
steps:
- name: Set up Go ${{ env.GOVER }}
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVER }}
- name: Check out code
uses: actions/checkout@v3
- name: Run go mod tidy
run: go mod tidy
- name: build & archive binaries
run: |
make archive-release-windows-amd64
- name: upload artifacts
uses: actions/upload-artifact@master
with:
name: yomo-artifact
path: ./bin/**/*
publish:
name: Publish binaries
# needs: [build-linux, build-darwin, build-windows]
needs: [build-linux-amd64]
needs: [build-linux-amd64, build-linux-arm64, build-darwin-amd64, build-windows-amd64]
env:
ARTIFACT_DIR: ./release
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ archive-release-linux-amd64:
rm -rf bin/yomo
GOARCH=amd64 GOOS=linux $(GO) build -o bin/yomo -ldflags "-s -w ${GO_LDFLAGS}" ./yomo/main.go
tar -C ./bin -czf bin/yomo-${VER}-x86_64-Linux.tar.gz yomo
make bina

archive-release-linux-arm64:
rm -rf bin/yomo
Expand All @@ -59,8 +60,7 @@ archive-release-darwin-arm64:
tar -C ./bin -czf bin/yomo-${VER}-arm64-Darwin.tar.gz yomo

archive-release-windows-amd64:
rm -rf bin/yomo
GOARCH=amd64 GOOS=windows $(GO) build -o bin/yomo.exe -ldflags "-s -w ${GO_LDFLAGS}" ./yomo/main.go
$(GO) build -o bin/yomo.exe -ldflags "-s -w ${GO_LDFLAGS}" ./yomo/main.go
tar -C ./bin -czf bin/yomo-${VER}-x86_64-Windows.tar.gz yomo.exe

build-w-sym:
Expand Down

0 comments on commit 4fee5d6

Please sign in to comment.