diff --git a/.goreleaser.yml b/.goreleaser.yml index 04439bb..349dc11 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -40,13 +40,11 @@ builds: - linux goarch: - amd64 - - arm64 - goarm: - - 6 - - 7 ldflags: - -s -w -X "main.buildVersion={{ .Tag }} ({{ .ShortCommit }} {{ .Date }})" main: ./web/ + hooks: + pre: sh -c 'cd ./docs/ && yarn build' archives: - id: cli @@ -67,6 +65,18 @@ archives: - README.md - LICENSE + - id: web + builds: + - web + wrap_in_directory: true + files: + - README.md + - LICENSE + - config-api-sample.toml + - src: "docs/dist/*" + dst: "docs" + name_template: "{{ .ProjectName }}_web_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + changelog: sort: asc use: github @@ -84,7 +94,6 @@ changelog: - title: Others order: 999 - dockers: - image_templates: - "ghcr.io/mr-karan/doggo:{{ .Tag }}" @@ -104,7 +113,6 @@ dockers: - --label=org.opencontainers.image.created={{ .Date }} - --label=org.opencontainers.image.revision={{ .FullCommit }} - - image_templates: - "ghcr.io/mr-karan/doggo:{{ .Tag }}-arm64v8" - "ghcr.io/mr-karan/doggo:latest-arm64v8" @@ -121,3 +129,15 @@ dockers: - --label=org.opencontainers.image.version=v{{ .Version }} - --label=org.opencontainers.image.created={{ .Date }} - --label=org.opencontainers.image.revision={{ .FullCommit }} + + - image_templates: + - "ghcr.io/mr-karan/doggo-web:{{ .Tag }}" + - "ghcr.io/mr-karan/doggo-web:latest" + ids: + - web + goarch: amd64 + dockerfile: web.Dockerfile + use: buildx + extra_files: + - config-api-sample.toml + - docs/dist/ diff --git a/web.Dockerfile b/web.Dockerfile index ce88e92..f63849e 100644 --- a/web.Dockerfile +++ b/web.Dockerfile @@ -1,7 +1,8 @@ # Dockerfile -ARG ARCH -FROM ${ARCH}/alpine +FROM ubuntu:24.04 WORKDIR /app -COPY doggo-api.bin . +RUN ls -alht +COPY doggo-web.bin . COPY config-api-sample.toml config.toml -CMD ["./doggo-api.bin"] +COPY docs/dist /app/dist/ +CMD ["./doggo-web.bin"]