mirror of https://github.com/statping/statping
parent
4d8fae354a
commit
edb7306b6b
|
@ -122,7 +122,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install Statping
|
- name: Install Statping
|
||||||
env:
|
env:
|
||||||
VERSION: $VERSION
|
VERSION: ${{ env.VERSION }}
|
||||||
run: |
|
run: |
|
||||||
make build
|
make build
|
||||||
chmod +x statping
|
chmod +x statping
|
||||||
|
@ -131,7 +131,7 @@ jobs:
|
||||||
- name: Go Tests
|
- name: Go Tests
|
||||||
run: SASS=`which sass` go test -v -covermode=count -coverprofile=coverage.out -p=1 ./...
|
run: SASS=`which sass` go test -v -covermode=count -coverprofile=coverage.out -p=1 ./...
|
||||||
env:
|
env:
|
||||||
VERSION: $VERSION
|
VERSION: ${{ env.VERSION }}
|
||||||
DB_CONN: sqlite3
|
DB_CONN: sqlite3
|
||||||
STATPING_DIR: /home/runner/work/statping/statping
|
STATPING_DIR: /home/runner/work/statping/statping
|
||||||
API_KEY: demopassword123
|
API_KEY: demopassword123
|
||||||
|
@ -198,34 +198,37 @@ jobs:
|
||||||
|
|
||||||
- name: Build Binaries
|
- name: Build Binaries
|
||||||
env:
|
env:
|
||||||
VERSION: $VERSION
|
VERSION: ${{ env.VERSION }}
|
||||||
COMMIT: $GITHUB_SHA
|
COMMIT: $GITHUB_SHA
|
||||||
run: make build-bin build-win
|
run: make build-bin build-win
|
||||||
|
|
||||||
- name: Create Release
|
- name: Upload Release
|
||||||
id: create_release
|
id: upload-release-asset
|
||||||
uses: actions/create-release@latest
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
VERSION: $VERSION
|
VERSION: ${{ env.VERSION }}
|
||||||
with:
|
with:
|
||||||
tag_name: v$VERSION
|
tag_name: v${{ env.VERSION }}
|
||||||
release_name: Statping v$VERSION
|
|
||||||
body: Version v$VERSION
|
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
files: |
|
||||||
- name: Upload Release Binaries
|
build/statping-darwin-386.tar.gz
|
||||||
id: upload-release-asset
|
build/statping-darwin-amd64.tar.gz
|
||||||
uses: actions/upload-release-asset@v1
|
build/statping-freebsd-386.tar.gz
|
||||||
env:
|
build/statping-freebsd-amd64.tar.gz
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
build/statping-freebsd-arm.tar.gz
|
||||||
VERSION: $VERSION
|
build/statping-linux-386.tar.gz
|
||||||
with:
|
build/statping-linux-amd64.tar.gz
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
build/statping-linux-arm.tar.gz
|
||||||
pattern: |
|
build/statping-linux-arm64.tar.gz
|
||||||
"build/*.tar.gz"
|
build/statping-openbsd-386.tar.gz
|
||||||
"build/*.zip"
|
build/statping-openbsd-amd64.tar.gz
|
||||||
|
build/statping-openbsd-arm.tar.gz
|
||||||
|
build/statping-openbsd-arm64.tar.gz
|
||||||
|
build/statping-windows-386.zip
|
||||||
|
build/statping-windows-amd64.zip
|
||||||
|
build/statping-windows-arm.zip
|
||||||
|
|
||||||
post-release:
|
post-release:
|
||||||
needs: build
|
needs: build
|
||||||
|
@ -249,7 +252,7 @@ jobs:
|
||||||
SENTRY_ORG: statping
|
SENTRY_ORG: statping
|
||||||
SENTRY_PROJECT: backend
|
SENTRY_PROJECT: backend
|
||||||
with:
|
with:
|
||||||
tagName: v$VERSION
|
tagName: v${{ env.VERSION }}
|
||||||
environment: production
|
environment: production
|
||||||
|
|
||||||
- name: Sentry Frontend Release
|
- name: Sentry Frontend Release
|
||||||
|
@ -260,5 +263,5 @@ jobs:
|
||||||
SENTRY_ORG: statping
|
SENTRY_ORG: statping
|
||||||
SENTRY_PROJECT: frontend
|
SENTRY_PROJECT: frontend
|
||||||
with:
|
with:
|
||||||
tagName: v$VERSION
|
tagName: v${{ env.VERSION }}
|
||||||
environment: production
|
environment: production
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -159,7 +159,7 @@ build-bin:
|
||||||
do \
|
do \
|
||||||
for os in $(OS);\
|
for os in $(OS);\
|
||||||
do \
|
do \
|
||||||
echo "Building $$os-$$arch"; \
|
echo "Building $$VERSION $$os-$$arch"; \
|
||||||
mkdir -p releases/statping-$$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; \
|
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; \
|
||||||
chmod +x releases/statping-$$os-$$arch/statping; \
|
chmod +x releases/statping-$$os-$$arch/statping; \
|
||||||
|
|
Loading…
Reference in New Issue