ci: add mui build to release steps (#3023)

This commit is contained in:
Travis Groth 2022-02-09 16:53:36 -05:00 committed by GitHub
parent 8b3b135c7a
commit 0ece090c85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 2 deletions

View file

@ -15,6 +15,8 @@ before:
hooks:
- go mod download
- make build-deps
- make yarn
- make build-ui
builds:
- id: pomerium
@ -44,6 +46,7 @@ builds:
env:
- TARGET={{ .Os }}-{{ .Arch }}
archives:
- name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
id: pomerium

View file

@ -19,6 +19,11 @@ jobs:
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Set up Go
uses: actions/setup-go@v2
with:

View file

@ -1,3 +1,18 @@
FROM node:16 as ui
WORKDIR /build
COPY .git ./.git
COPY Makefile ./Makefile
# download yarn dependencies
COPY ui/yarn.lock ./ui/yarn.lock
COPY ui/package.json ./ui/package.json
RUN make yarn
# build ui
COPY ./ui/ ./ui/
RUN make build-ui
FROM golang:latest as build
WORKDIR /go/src/github.com/pomerium/pomerium
@ -8,9 +23,9 @@ RUN apt-get update \
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY --from=ui /build/ui/dist ./ui/dist
# build
RUN make build-deps
RUN make build-debug NAME=pomerium
RUN touch /config.yaml
RUN go get github.com/go-delve/delve/cmd/dlv

View file

@ -81,7 +81,7 @@ build: build-go build-ui
@echo "==> $@"
.PHONY: build-debug
build-debug: build-deps build-ui ## Builds binaries appropriate for debugging
build-debug: build-deps ## Builds binaries appropriate for debugging
@echo "==> $@"
@CGO_ENABLED=0 GO111MODULE=on $(GO) build -gcflags="all=-N -l" -o $(BINDIR)/$(NAME) ./cmd/"$(NAME)"