forked from Mirrors/gomuks
ci: build frontend
This commit is contained in:
parent
1a359f9793
commit
3b2ae2d625
2 changed files with 28 additions and 0 deletions
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
|
@ -27,6 +27,8 @@ jobs:
|
||||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
pip install pre-commit
|
pip install pre-commit
|
||||||
export PATH="$HOME/go/bin:$PATH"
|
export PATH="$HOME/go/bin:$PATH"
|
||||||
|
mkdir -p web/dist
|
||||||
|
touch web/dist/empty
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v ./...
|
run: go build -v ./...
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
stages:
|
stages:
|
||||||
|
- frontend
|
||||||
- build
|
- build
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -10,6 +11,23 @@ cache:
|
||||||
paths:
|
paths:
|
||||||
- .cache
|
- .cache
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
image: node:22-alpine
|
||||||
|
stage: frontend
|
||||||
|
variables:
|
||||||
|
NODE_ENV: "production"
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- web/node_modules
|
||||||
|
script:
|
||||||
|
- cd web
|
||||||
|
- npm install
|
||||||
|
- npm run build
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- web/dist
|
||||||
|
expire_in: 1 hour
|
||||||
|
|
||||||
.build-linux: &build-linux
|
.build-linux: &build-linux
|
||||||
stage: build
|
stage: build
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -19,6 +37,10 @@ cache:
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- gomuks
|
- gomuks
|
||||||
|
dependencies:
|
||||||
|
- build frontend
|
||||||
|
needs:
|
||||||
|
- build frontend
|
||||||
|
|
||||||
linux/amd64:
|
linux/amd64:
|
||||||
<<: *build-linux
|
<<: *build-linux
|
||||||
|
@ -62,3 +84,7 @@ macos/arm64:
|
||||||
paths:
|
paths:
|
||||||
- gomuks
|
- gomuks
|
||||||
- libolm.3.dylib
|
- libolm.3.dylib
|
||||||
|
dependencies:
|
||||||
|
- build frontend
|
||||||
|
needs:
|
||||||
|
- build frontend
|
||||||
|
|
Loading…
Add table
Reference in a new issue