Skip to content

Commit

Permalink
[FIX](ci)修复ci的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbeatty committed Oct 31, 2021
1 parent 5ba4ba0 commit afc6e52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Setup Go v1.16
uses: actions/setup-go@v1
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- run: |
# https://github.com/actions/setup-go/issues/107
cp -f `which go` /usr/bin/go
- name: Set Go Path && Build tool
run: |
go env -w GO111MODULE=on
go env -w GOPATH=$GOROOT
go get -u github.com/gobuffalo/packr/packr
go install github.com/gobuffalo/packr/packr@latest
- name: Check out code into current branch
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ app:
gomips=$(shell echo "$(n)" | cut -d : -f 3);\
target_suffix=$${os}_$${arch};\
echo "Build $${os}-$${arch}...";\
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -o ./release/oms_$${target_suffix} main.go;\
env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} packr build -trimpath -ldflags "$(LDFLAGS)" -o ./release/oms_$${target_suffix} main.go;\
echo "Build $${os}-$${arch} done";\
)
@mv ./release/oms_windows_amd64 ./release/oms_windows_amd64.exe

0 comments on commit afc6e52

Please sign in to comment.