mirror of https://github.com/statping/statping
GH actions and golang static builds
parent
454c5b7029
commit
e8ae4ab5f3
|
@ -311,7 +311,7 @@ jobs:
|
|||
path: ./build
|
||||
|
||||
upload-release:
|
||||
needs: [test, build-linux, build-mac, build-windows]
|
||||
needs: [test, postman-tests, build-linux, build-mac, build-windows]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -394,7 +394,7 @@ jobs:
|
|||
windows/statping-windows-arm.zip
|
||||
|
||||
docker-release:
|
||||
needs: [test, build-linux, build-mac, build-windows]
|
||||
needs: upload-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Statping Repo
|
||||
|
@ -428,7 +428,7 @@ jobs:
|
|||
buildargs: VERSION,ARCH
|
||||
|
||||
sentry-release:
|
||||
needs: [test, build-linux, build-mac, build-windows]
|
||||
needs: upload-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Statping Repo
|
||||
|
@ -461,7 +461,7 @@ jobs:
|
|||
environment: production
|
||||
|
||||
homebrew-release:
|
||||
needs: [test, build-linux, build-mac, build-windows]
|
||||
needs: upload-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Statping Repo
|
||||
|
@ -478,7 +478,7 @@ jobs:
|
|||
run: make publish-homebrew
|
||||
|
||||
slack-update:
|
||||
needs: [test, build-linux, build-mac, build-windows]
|
||||
needs: upload-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Statping Repo
|
||||
|
|
6
Makefile
6
Makefile
|
@ -160,7 +160,7 @@ build-linux:
|
|||
do \
|
||||
echo "Building v${VERSION} for $$os-$$arch"; \
|
||||
mkdir -p releases/statping-$$os-$$arch/; \
|
||||
GO111MODULE="on" GOOS=$$os GOARCH=$$arch go build -a -ldflags "-X main.VERSION=${VERSION} -X main.COMMIT=$(TRAVIS_COMMIT)" -o releases/statping-$$os-$$arch/statping ${PWD}/cmd || true; \
|
||||
GO111MODULE="on" GOOS=$$os GOARCH=$$arch go build -a -ldflags "-X main.VERSION=${VERSION} -linkmode external -extldflags -static" -o releases/statping-$$os-$$arch/statping ${PWD}/cmd || true; \
|
||||
chmod +x releases/statping-$$os-$$arch/statping || true; \
|
||||
tar -czf releases/statping-$$os-$$arch.tar.gz -C releases/statping-$$os-$$arch statping || true; \
|
||||
done \
|
||||
|
@ -174,7 +174,7 @@ build-mac:
|
|||
do \
|
||||
echo "Building v${VERSION} for darwin-$$arch"; \
|
||||
mkdir -p releases/statping-darwin-$$arch/; \
|
||||
GO111MODULE="on" GOOS=darwin GOARCH=$$arch go build -a -ldflags "-X main.VERSION=${VERSION} -X main.COMMIT=$(TRAVIS_COMMIT)" -o releases/statping-darwin-$$arch/statping ${PWD}/cmd || true; \
|
||||
GO111MODULE="on" GOOS=darwin GOARCH=$$arch go build -a -ldflags "-X main.VERSION=${VERSION}" -o releases/statping-darwin-$$arch/statping ${PWD}/cmd || true; \
|
||||
chmod +x releases/statping-darwin-$$arch/statping || true; \
|
||||
tar -czf releases/statping-darwin-$$arch.tar.gz -C releases/statping-darwin-$$arch statping || true; \
|
||||
done
|
||||
|
@ -187,7 +187,7 @@ build-win:
|
|||
do \
|
||||
echo "Building v${VERSION} for windows-$$arch"; \
|
||||
mkdir -p releases/statping-windows-$$arch/; \
|
||||
GO111MODULE="on" GOOS=windows GOARCH=$$arch go build -a -ldflags "-X main.VERSION=${VERSION} -X main.COMMIT=$(TRAVIS_COMMIT)" -o releases/statping-windows-$$arch/statping.exe ${PWD}/cmd || true; \
|
||||
GO111MODULE="on" GOOS=windows GOARCH=$$arch go build -a -ldflags "-X main.VERSION=${VERSION}" -o releases/statping-windows-$$arch/statping.exe ${PWD}/cmd || true; \
|
||||
chmod +x releases/statping-windows-$$arch/statping.exe || true; \
|
||||
zip -j releases/statping-windows-$$arch.zip releases/statping-windows-$$arch/statping.exe || true; \
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue