ugh github actions.....

pull/515/head
hunterlong 2020-04-19 23:55:11 -07:00
parent 9d3fdaee9b
commit 75c9131a8a
1 changed files with 4 additions and 67 deletions

View File

@ -27,29 +27,11 @@ jobs:
- name: Install Global Dependencies - name: Install Global Dependencies
run: npm install -g yarn sass cross-env 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 - name: Download Frontend Dependencies
if: steps.nodecache.outputs.cache-hit != 'true' if: steps.nodecache.outputs.cache-hit != 'true'
working-directory: ./frontend working-directory: ./frontend
run: yarn 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 - name: Download Go mods
if: steps.golangcache.outputs.cache-hit != 'true' if: steps.golangcache.outputs.cache-hit != 'true'
run: | run: |
@ -60,17 +42,11 @@ jobs:
- name: Build Frontend Statping - name: Build Frontend Statping
run: make clean compile 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) - name: Upload Compiled Frontend (rice-box.go)
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: static-rice-box name: static-rice-box
path: /home/runner/work/statping/statping/source/rice-box.go path: ./source/rice-box.go
test: test:
needs: compile needs: compile
@ -94,17 +70,11 @@ jobs:
echo ::set-env name=VERSION::$(cat version.txt) echo ::set-env name=VERSION::$(cat version.txt)
shell: bash 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) - name: Download Compiled Frontend (rice-box.go)
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: static-rice-box name: static-rice-box
path: /home/runner/work/statping/statping/source/rice-box.go path: ./source/rice-box.go
- name: Install Statping - name: Install Statping
env: env:
@ -157,14 +127,8 @@ jobs:
- uses: actions/setup-go@v2 - uses: actions/setup-go@v2
with: with:
go-version: '1.14.x' go-version: '1.14.x'
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- uses: actions/checkout@v2 - 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 - name: Setting ENV's
run: | run: |
echo "::add-path::$(go env GOPATH)/bin" echo "::add-path::$(go env GOPATH)/bin"
@ -172,16 +136,6 @@ jobs:
echo ::set-env name=VERSION::$(cat version.txt) echo ::set-env name=VERSION::$(cat version.txt)
shell: bash 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 - name: Download Go mods
if: steps.golangcache.outputs.cache-hit != 'true' if: steps.golangcache.outputs.cache-hit != 'true'
run: | run: |
@ -189,23 +143,17 @@ jobs:
go mod verify go mod verify
make test-deps 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) - name: Download Compiled Frontend (rice-box.go)
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: static-rice-box name: static-rice-box
path: /home/runner/work/statping/statping/source/rice-box.go path: ./source/rice-box.go
- name: Build Binaries - name: Build Binaries
env: env:
VERSION: ${{ env.VERSION }} VERSION: ${{ env.VERSION }}
COMMIT: $GITHUB_SHA COMMIT: $GITHUB_SHA
run: make clean compile build-bin build-win run: make build-bin build-win
- name: Upload Release - name: Upload Release
id: upload-release-asset id: upload-release-asset
@ -235,17 +183,6 @@ jobs:
build/statping-windows-amd64.zip build/statping-windows-amd64.zip
build/statping-windows-arm.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: post-release:
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest