github actions

pull/576/head
hunterlong 2020-05-05 22:33:17 -07:00
parent 32da4badde
commit 1d69d39bc7
2 changed files with 32 additions and 24 deletions

View File

@ -194,14 +194,8 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.14.2'
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- uses: actions/checkout@v2
- name: Install Global Dependencies
run: npm install -g yarn sass
- name: Setting ENV's
run: |
echo "::add-path::$(go env GOPATH)/bin"
@ -212,8 +206,16 @@ jobs:
- name: Download Go mods
run: make test-deps
- name: Download Compiled Frontend (rice-box.go)
uses: actions/download-artifact@v2
with:
name: static-rice-box
path: ./source
- name: Build with xgo
run: make clean compile build-mac
run: |
[ ! -d "source/dist" ] && exit 2
make build-mac
- name: Upload MacOSX Builds
uses: actions/upload-artifact@v2
@ -228,13 +230,8 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.14.2'
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- uses: actions/checkout@v2
- name: Install Global Dependencies
run: npm install -g yarn sass
- uses: actions/checkout@v2
- name: Setting ENV's
run: |
@ -246,8 +243,16 @@ jobs:
- name: Download Go mods
run: make test-deps
- name: Download Compiled Frontend (rice-box.go)
uses: actions/download-artifact@v2
with:
name: static-rice-box
path: ./source
- name: Build with xgo
run: make clean compile build-linux
run: |
[ ! -d "source/dist" ] && exit 2
make build-linux
- name: Upload Linux Builds
uses: actions/upload-artifact@v2
@ -262,13 +267,8 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.14.2'
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- uses: actions/checkout@v2
- name: Install Global Dependencies
run: npm install -g yarn sass
- uses: actions/checkout@v2
- name: Setting ENV's
run: |
@ -280,8 +280,16 @@ jobs:
- name: Download Go mods
run: make test-deps
- name: Download Compiled Frontend (rice-box.go)
uses: actions/download-artifact@v2
with:
name: static-rice-box
path: ./source
- name: Build with xgo
run: make clean compile build-win
run: |
[ ! -d "source/dist" ] && exit 2
make build-win
- name: Upload Windows Builds
uses: actions/upload-artifact@v2

View File

@ -179,13 +179,13 @@ compress:
done
build-linux:
xgo -go=$(GOVERSION) -dest=build -pkg=cmd -ldflags="-s -w -extldflags -static -X main.VERSION=${VERSION}" -targets="linux/amd64,linux/386,linux/arm-7,linux/arm-6,linux/arm64,linux/arm" -out=statping .
xgo -go=$(GOVERSION) -dest=build -pkg=cmd -ldflags="-s -w -extldflags -static -X main.VERSION=${VERSION}" -targets="linux/amd64,linux/386,linux/arm-7,linux/arm-6,linux/arm64,linux/arm" -out=statping ./
build-mac:
xgo -go=$(GOVERSION) -dest=build -pkg=cmd -ldflags="-s -w -X main.VERSION=${VERSION}" -targets="darwin/amd64,darwin/386" -out=statping .
xgo -go=$(GOVERSION) -dest=build -pkg=cmd -ldflags="-s -w -X main.VERSION=${VERSION}" -targets="darwin/amd64,darwin/386" -out=statping ./
build-win:
xgo -go=$(GOVERSION) -dest=build -pkg=cmd -ldflags="-s -w -extldflags -static -X main.VERSION=${VERSION}" -targets="windows-6.0/amd64,windows-6.0/386" -out=statping .
xgo -go=$(GOVERSION) -dest=build -pkg=cmd -ldflags="-s -w -extldflags -static -X main.VERSION=${VERSION}" -targets="windows-6.0/amd64,windows-6.0/386" -out=statping ./
# remove files for a clean compile/build
clean: