2023-05-24 16:46:28 +08:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
|
|
|
|
name: Build Test
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux-binary:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-05-25 15:48:00 +08:00
|
|
|
- name: Install cross-compilers
|
|
|
|
run: sudo apt-get update && sudo apt-get -y install gcc-x86-64-linux-gnu gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-powerpc64le-linux-gnu gcc-s390x-linux-gnu
|
2023-05-24 16:46:28 +08:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
2023-05-25 16:46:39 +08:00
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v3
|
2023-05-24 16:46:28 +08:00
|
|
|
with:
|
|
|
|
node-version: '18.14'
|
|
|
|
- name: Build Web
|
|
|
|
id: build_frontend
|
|
|
|
run: |
|
|
|
|
cd frontend && npm install && npm run build:dev
|
|
|
|
env:
|
|
|
|
NODE_OPTIONS: --max-old-space-size=8192
|
2023-05-25 16:46:39 +08:00
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v4
|
2023-05-24 16:46:28 +08:00
|
|
|
with:
|
|
|
|
go-version: '1.20.x'
|
|
|
|
- name: Build Server
|
|
|
|
uses: goreleaser/goreleaser-action@v4
|
|
|
|
with:
|
|
|
|
args: release --snapshot --clean
|