diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index 4ced358ea6..805f6e9a8c 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -80,7 +80,7 @@ jobs: with: distribution: goreleaser-pro version: v1.18.2 - args: release --clean --skip-announce -f .goreleaser.dev.yaml + args: release --clean --skip-announce -f .goreleaser.demo.yaml env: VERSION: ${{ github.ref_name}}-demo TRACETEST_ENV: demo diff --git a/.goreleaser.demo.yaml b/.goreleaser.demo.yaml new file mode 100644 index 0000000000..007abe02fd --- /dev/null +++ b/.goreleaser.demo.yaml @@ -0,0 +1,66 @@ +# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json +project_name: tracetest +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +release: + disable: true +before: + hooks: + - dir: ./server + cmd: go mod tidy + - dir: ./cli + cmd: go mod tidy +env: + - VERSION={{ if index .Env "VERSION" }}{{ .Env.VERSION }}{{ else }}dev{{ end }} + - TRACETEST_ENV={{ if index .Env "TRACETEST_ENV" }}{{ .Env.TRACETEST_ENV }}{{ else }}dev{{ end }} + - ANALYTICS_BE_KEY={{ if index .Env "ANALYTICS_BE_KEY" }}{{ .Env.ANALYTICS_BE_KEY }}{{ else }}{{ end }} + - ANALYTICS_FE_KEY={{ if index .Env "ANALYTICS_FE_KEY" }}{{ .Env.ANALYTICS_FE_KEY }}{{ else }}{{ end }} +builds: + - id: server + binary: tracetest-server + main: ./server/main.go + ldflags: + - -X github.com/kubeshop/tracetest/server/app.Version={{ .Env.VERSION }} + - -X github.com/kubeshop/tracetest/server/app.Env={{ .Env.TRACETEST_ENV }} + - -X github.com/kubeshop/tracetest/server/analytics.SecretKey={{ .Env.ANALYTICS_BE_KEY }} + - -X github.com/kubeshop/tracetest/server/analytics.FrontendKey={{ .Env.ANALYTICS_FE_KEY }} + env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - amd64 + - id: cli + binary: tracetest + main: ./cli/main.go + ldflags: + - -X github.com/kubeshop/tracetest/cli/config.Version={{ .Env.VERSION }} + - -X github.com/kubeshop/tracetest/cli/config.Env={{ .Env.TRACETEST_ENV }} + - -X github.com/kubeshop/tracetest/cli/analytics.SecretKey={{ .Env.ANALYTICS_BE_KEY }} + env: + - CGO_ENABLED=0 + goos: + - linux + goarch: + - amd64 + +dockers: +- skip_push: '{{ .Env.PUBLISH_DOCKER }}' + image_templates: + - 'kubeshop/tracetest:{{ .Env.VERSION }}' + extra_files: + - web/build + build_flag_templates: + - "--pull" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source={{.GitURL}}" + - "--platform=linux/amd64" + goos: linux + goarch: amd64 diff --git a/.goreleaser.dev.yaml b/.goreleaser.dev.yaml index d143ce3716..ac4c1714bc 100644 --- a/.goreleaser.dev.yaml +++ b/.goreleaser.dev.yaml @@ -19,6 +19,7 @@ env: - TRACETEST_ENV={{ if index .Env "TRACETEST_ENV" }}{{ .Env.TRACETEST_ENV }}{{ else }}dev{{ end }} - ANALYTICS_BE_KEY={{ if index .Env "ANALYTICS_BE_KEY" }}{{ .Env.ANALYTICS_BE_KEY }}{{ else }}{{ end }} - ANALYTICS_FE_KEY={{ if index .Env "ANALYTICS_FE_KEY" }}{{ .Env.ANALYTICS_FE_KEY }}{{ else }}{{ end }} + builds: - id: server binary: tracetest-server