mirror of https://github.com/statping/statping
ugh github actions.....
parent
9d3fdaee9b
commit
75c9131a8a
|
@ -27,29 +27,11 @@ jobs:
|
|||
- name: Install Global Dependencies
|
||||
run: npm install -g yarn sass cross-env
|
||||
|
||||
- uses: actions/cache@v1
|
||||
id: nodecache
|
||||
with:
|
||||
path: ./frontend/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
|
||||
- name: Download Frontend Dependencies
|
||||
if: steps.nodecache.outputs.cache-hit != 'true'
|
||||
working-directory: ./frontend
|
||||
run: yarn
|
||||
|
||||
- uses: actions/cache@v1
|
||||
id: golangcache
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/go/bin
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Download Go mods
|
||||
if: steps.golangcache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
|
@ -60,17 +42,11 @@ jobs:
|
|||
- name: Build Frontend Statping
|
||||
run: make clean compile
|
||||
|
||||
- name: Upload Compiled Frontend Folder
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: static-frontend
|
||||
path: /home/runner/work/statping/statping/source/dist
|
||||
|
||||
- name: Upload Compiled Frontend (rice-box.go)
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: static-rice-box
|
||||
path: /home/runner/work/statping/statping/source/rice-box.go
|
||||
path: ./source/rice-box.go
|
||||
|
||||
test:
|
||||
needs: compile
|
||||
|
@ -94,17 +70,11 @@ jobs:
|
|||
echo ::set-env name=VERSION::$(cat version.txt)
|
||||
shell: bash
|
||||
|
||||
- name: Download Compiled Frontend
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: static-frontend
|
||||
path: /home/runner/work/statping/statping/source/dist
|
||||
|
||||
- name: Download Compiled Frontend (rice-box.go)
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: static-rice-box
|
||||
path: /home/runner/work/statping/statping/source/rice-box.go
|
||||
path: ./source/rice-box.go
|
||||
|
||||
- name: Install Statping
|
||||
env:
|
||||
|
@ -157,14 +127,8 @@ jobs:
|
|||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.14.x'
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '10.x'
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Global Dependencies
|
||||
run: npm install -g yarn sass newman cross-env wait-on @sentry/cli
|
||||
|
||||
- name: Setting ENV's
|
||||
run: |
|
||||
echo "::add-path::$(go env GOPATH)/bin"
|
||||
|
@ -172,16 +136,6 @@ jobs:
|
|||
echo ::set-env name=VERSION::$(cat version.txt)
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@v1
|
||||
id: golangcache
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/go/bin
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Download Go mods
|
||||
if: steps.golangcache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
|
@ -189,23 +143,17 @@ jobs:
|
|||
go mod verify
|
||||
make test-deps
|
||||
|
||||
- name: Download Compiled Frontend
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: static-frontend
|
||||
path: /home/runner/work/statping/statping/source/dist
|
||||
|
||||
- name: Download Compiled Frontend (rice-box.go)
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: static-rice-box
|
||||
path: /home/runner/work/statping/statping/source/rice-box.go
|
||||
path: ./source/rice-box.go
|
||||
|
||||
- name: Build Binaries
|
||||
env:
|
||||
VERSION: ${{ env.VERSION }}
|
||||
COMMIT: $GITHUB_SHA
|
||||
run: make clean compile build-bin build-win
|
||||
run: make build-bin build-win
|
||||
|
||||
- name: Upload Release
|
||||
id: upload-release-asset
|
||||
|
@ -235,17 +183,6 @@ jobs:
|
|||
build/statping-windows-amd64.zip
|
||||
build/statping-windows-arm.zip
|
||||
|
||||
# - name: Upload Assets to S3
|
||||
# uses: jakejarvis/s3-sync-action@master
|
||||
# with:
|
||||
# args: --acl public-read --follow-symlinks --delete
|
||||
# env:
|
||||
# AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
|
||||
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
# AWS_REGION: 'us-west-1'
|
||||
# SOURCE_DIR: 'source/dist'
|
||||
|
||||
post-release:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
|
Loading…
Reference in New Issue