chore(deps): weekly safe npm updates · 7 packages #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: binaries | |
| # Build-only PR check that the web UI embed and the CGO_ENABLED=0 | |
| # cross-compilation still work; the release workflow builds the binaries that | |
| # actually ship. Backend tests verified separately in backend-ci. | |
| on: | |
| pull_request: | |
| paths: | |
| - backend/** | |
| - frontend/** | |
| - .github/workflows/binaries.yml | |
| - .github/workflows/release.yml | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: install pnpm | |
| run: npm install -g pnpm@11 | |
| - name: build web UI (same-origin API) | |
| working-directory: frontend | |
| run: | | |
| pnpm install --frozen-lockfile | |
| pnpm run build | |
| - name: embed web UI | |
| run: | | |
| rm -rf backend/internal/assets/webui | |
| cp -R frontend/dist backend/internal/assets/webui | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: backend/go.mod | |
| cache-dependency-path: backend/go.sum | |
| - name: build binaries | |
| working-directory: backend | |
| env: | |
| CGO_ENABLED: "0" | |
| run: | | |
| mkdir -p dist | |
| GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o dist/cueto-linux-amd64 ./cmd/cueto | |
| GOOS=linux GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o dist/cueto-linux-arm64 ./cmd/cueto | |
| GOOS=darwin GOARCH=arm64 go build -trimpath -ldflags="-s -w" -o dist/cueto-darwin-arm64 ./cmd/cueto |