diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e65f33eca8..38417d107e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,14 @@ jobs: - name: Install gox run: GO111MODULE=off go get github.com/mitchellh/gox + - name: "Set up QEMU" + uses: docker/setup-qemu-action@v1 + with: + platforms: all + + - name: "Set up Docker buildx" + uses: "docker/setup-buildx-action@v1" + - name: Login to Docker Hub uses: docker/login-action@v1 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index 3e1e29321d..1e74b171a3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -27,6 +27,7 @@ builds: - amd64 - "386" - arm + - arm64 ignore: - goos: darwin goarch: "386" @@ -40,6 +41,10 @@ builds: goarch: arm - goos: freebsd goarch: arm + - goos: windows + goarch: arm64 + - goos: freebsd + goarch: arm64 main: . ldflags: -s -w -X main.VERSION={{.Version}} binary: centrifugo @@ -72,14 +77,46 @@ signs: signature: ${artifact}.sig artifacts: none dockers: - - - ids: + - ids: - centrifugo goos: linux goarch: amd64 - goarm: '' image_templates: - - "centrifugo/centrifugo:{{ .Tag }}" - - "centrifugo/centrifugo:v{{ .Major }}" - - "centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}" - - "centrifugo/centrifugo:latest" + - "centrifugo/centrifugo:{{ .Tag }}-amd64" + - "centrifugo/centrifugo:v{{ .Major }}-amd64" + - "centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}-amd64" + - "centrifugo/centrifugo:latest-amd64" + use_buildx: true + build_flag_templates: + - "--platform=linux/amd64" + - "--pull" + - ids: + - centrifugo + goos: linux + goarch: arm64 + image_templates: + - "centrifugo/centrifugo:{{ .Tag }}-arm64v8" + - "centrifugo/centrifugo:v{{ .Major }}-arm64v8" + - "centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }}-arm64v8" + - "centrifugo/centrifugo:latest-arm64v8" + use_buildx: true + build_flag_templates: + - "--platform=linux/arm64/v8" + - "--pull" +docker_manifests: + - name_template: centrifugo/centrifugo:{{ .Tag }} + image_templates: + - centrifugo/centrifugo:{{ .Tag }}-arm64v8 + - centrifugo/centrifugo:{{ .Tag }}-amd64 + - name_template: centrifugo/centrifugo:v{{ .Major }} + image_templates: + - centrifugo/centrifugo:{{ .Tag }}-arm64v8 + - centrifugo/centrifugo:{{ .Tag }}-amd64 + - name_template: centrifugo/centrifugo:v{{ .Major }}.{{ .Minor }} + image_templates: + - centrifugo/centrifugo:{{ .Tag }}-arm64v8 + - centrifugo/centrifugo:{{ .Tag }}-amd64 + - name_template: centrifugo/centrifugo:latest + image_templates: + - centrifugo/centrifugo:{{ .Tag }}-arm64v8 + - centrifugo/centrifugo:{{ .Tag }}-amd64 \ No newline at end of file