File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 GITHUB_TOKEN : ${{ secrets.GH_PAT }}
4040 CHOCOLATEY_API_KEY : ${{ secrets.CHOCOLATEY_API_KEY }}
4141
42- release_demo_assets :
43- name : Render demo videos
44- needs : release_and_brew
45- runs-on : ubuntu-latest
46- permissions :
47- contents : write
48-
49- steps :
50- - name : Checkout code
51- uses : actions/checkout@v5
52-
53- - name : Set up Go
54- uses : actions/setup-go@v6
55- with :
56- go-version : ^1.24
57-
58- - name : Set up Node.js
59- uses : actions/setup-node@v5
60- with :
61- node-version : 22
62-
63- - name : Build report UI
64- run : npm ci && npm run build
65- working-directory : html-report/ui
66-
67- - name : Install render dependencies
68- run : |
69- sudo apt-get update
70- sudo apt-get install -y ffmpeg ttyd
71- go install github.com/charmbracelet/vhs@v0.11.0
72- echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
73-
74- - name : Render demos
75- run : make demos
76-
77- - name : Upload demo videos to release
78- uses : softprops/action-gh-release@v2
79- with :
80- tag_name : ${{ github.event.client_payload.new-tag }}
81- files : |
82- dist/demos/summary.mp4
83- dist/demos/console.mp4
84- env :
85- GITHUB_TOKEN : ${{ secrets.GH_PAT }}
86-
8742 publish_npm :
8843 if : success() || failure()
8944 name : Publish to NPM
Original file line number Diff line number Diff line change 11.github /vhs /tmp /
22dist /demos /
33html-report /ui /build /
4+ html-report /ui /node_modules /
Original file line number Diff line number Diff line change 1+ FROM --platform=$BUILDPLATFORM node:22-bookworm-slim AS ui-builder
2+
3+ WORKDIR /opt/openapi-changes/html-report/ui
4+ COPY html-report/ui/package.json html-report/ui/package-lock.json ./
5+ RUN npm ci
6+ COPY html-report/ui/ ./
7+ RUN npm run build
8+
19FROM --platform=$BUILDPLATFORM golang:1.25-bookworm AS builder
210
311ARG TARGETPLATFORM
@@ -10,6 +18,7 @@ RUN mkdir -p /opt/openapi-changes
1018WORKDIR /opt/openapi-changes
1119
1220COPY . ./
21+ COPY --from=ui-builder /opt/openapi-changes/html-report/ui/build/ html-report/ui/build/
1322
1423RUN go mod download && go mod verify
1524RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-w -s" -v -o /openapi-changes openapi-changes.go
You can’t perform that action at this time.
0 commit comments