Skip to content

Modern Docker Management, Designed for Everyone

chore: add upx to binaries in go releaser (#1527)

Kyle Mendellcc2ed2b34d31
diff --git a/.github/workflows/build-next-images.yml b/.github/workflows/build-next-images.yml
index 4a66850b9..b17968083 100644
--- a/.github/workflows/build-next-images.yml
+++ b/.github/workflows/build-next-images.yml
@@ -63,7 +63,7 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
- distribution: goreleaser
+ distribution: goreleaser-pro
version: "~> v2"
args: release --clean --skip=sign,announce,validate,nfpm,homebrew
env:
@@ -72,3 +72,4 @@ jobs:
SKIP_RELEASE: "true"
SKIP_CHANGELOG: "true"
GORELEASER_CURRENT_TAG: next-${{ steps.vars.outputs.sha_short }}
+ GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 1ce353362..47762f1c1 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -54,11 +54,12 @@ jobs:
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
- distribution: goreleaser
+ distribution: goreleaser-pro
version: "~> v2"
args: release --clean --skip=validate
env:
GITHUB_TOKEN: ${{ secrets.ARCANE_BOT_TOKEN }}
+ GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
# Docker Images
- name: Set up Depot CLI
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 58148587e..302aca51e 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -1,4 +1,4 @@
-# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
+# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
@@ -25,10 +25,10 @@ builds:
goarch:
- amd64
- arm64
- - '386'
+ - "386"
- arm
goarm:
- - '7'
+ - "7"
goamd64:
- v1
go386:
@@ -41,7 +41,7 @@ builds:
- -X github.com/getarcaneapp/arcane/backend/internal/config.BuildTime={{ .Date }}
flags:
- -trimpath
- mod_timestamp: '{{ .CommitTimestamp }}'
+ mod_timestamp: "{{ .CommitTimestamp }}"
- id: arcane-agent
main: ./cmd/main.go
@@ -58,7 +58,7 @@ builds:
- arm64
- arm
goarm:
- - '7'
+ - "7"
goamd64:
- v1
ldflags:
@@ -69,7 +69,7 @@ builds:
- -X github.com/getarcaneapp/arcane/backend/internal/config.BuildTime={{ .Date }}
flags:
- -trimpath
- mod_timestamp: '{{ .CommitTimestamp }}'
+ mod_timestamp: "{{ .CommitTimestamp }}"
- id: arcane-cli
main: .
@@ -83,10 +83,10 @@ builds:
goarch:
- amd64
- arm64
- - '386'
+ - "386"
- arm
goarm:
- - '7'
+ - "7"
goamd64:
- v1
go386:
@@ -98,7 +98,7 @@ builds:
- -X github.com/getarcaneapp/arcane/cli/internal/config.Revision={{ .ShortCommit }}
flags:
- -trimpath
- mod_timestamp: '{{ .CommitTimestamp }}'
+ mod_timestamp: "{{ .CommitTimestamp }}"
archives:
- id: arcane-cli
@@ -106,19 +106,41 @@ archives:
- arcane-cli
formats:
- tar.gz
- name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}'
+ name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}"
- id: default
ids:
- arcane
- arcane-agent
formats:
- binary
- name_template: '{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}'
+ name_template: "{{ .Binary }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}"
+
+upx:
+ - enabled: true
+ ids:
+ - arcane
+ - arcane-agent
+ - arcane-cli
+ goos:
+ - linux
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ - arm
+ - "386"
+ goarm:
+ - "7"
+ goamd64:
+ - v1
+ compress: best
+ lzma: true
+ brute: true
nfpms:
- id: arcane-cli
package_name: arcane-cli
- file_name_template: '{{ .ConventionalFileName }}'
+ file_name_template: "{{ .ConventionalFileName }}"
ids:
- arcane-cli
vendor: getarcaneapp
@@ -146,12 +168,12 @@ homebrew_casks:
- arcane-cli
binaries:
- arcane-cli
- description: 'Arcane CLI - Modern Docker Management, Designed for Everyone.'
- homepage: 'https://getarcane.app'
+ description: "Arcane CLI - Modern Docker Management, Designed for Everyone."
+ homepage: "https://getarcane.app"
repository:
owner: getarcaneapp
name: homebrew-tap
- commit_msg_template: 'chore(brew): update {{ .ProjectName }} to {{ .Tag }}'
+ commit_msg_template: "chore(brew): update {{ .ProjectName }} to {{ .Tag }}"
dockers_v2:
- id: arcane-next
@@ -159,25 +181,25 @@ dockers_v2:
- arcane
dockerfile: docker/next-builds/Dockerfile-static
images:
- - 'ghcr.io/getarcaneapp/arcane'
+ - "ghcr.io/getarcaneapp/arcane"
tags:
- - 'next'
- - '{{.Tag}}'
+ - "next"
+ - "{{.Tag}}"
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
labels:
- 'org.opencontainers.image.authors': 'OFKM Technologies'
- 'org.opencontainers.image.url': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.documentation': 'https://github.com/getarcaneapp/arcane/blob/main/README.md'
- 'org.opencontainers.image.source': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.version': '{{.Version}}'
- 'org.opencontainers.image.revision': '{{.FullCommit}}'
- 'org.opencontainers.image.licenses': 'BSD-3-Clause'
- 'org.opencontainers.image.title': 'Arcane'
- 'org.opencontainers.image.description': 'Modern Docker Management, Made for Everyone'
- 'com.getarcaneapp.arcane': 'true'
+ "org.opencontainers.image.authors": "OFKM Technologies"
+ "org.opencontainers.image.url": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.documentation": "https://github.com/getarcaneapp/arcane/blob/main/README.md"
+ "org.opencontainers.image.source": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.version": "{{.Version}}"
+ "org.opencontainers.image.revision": "{{.FullCommit}}"
+ "org.opencontainers.image.licenses": "BSD-3-Clause"
+ "org.opencontainers.image.title": "Arcane"
+ "org.opencontainers.image.description": "Modern Docker Management, Made for Everyone"
+ "com.getarcaneapp.arcane": "true"
disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
sbom: true
@@ -186,25 +208,25 @@ dockers_v2:
- arcane-agent
dockerfile: docker/next-builds/Dockerfile-agent-static
images:
- - 'ghcr.io/getarcaneapp/arcane-headless'
+ - "ghcr.io/getarcaneapp/arcane-headless"
tags:
- - 'next'
- - '{{.Tag}}'
+ - "next"
+ - "{{.Tag}}"
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
labels:
- 'org.opencontainers.image.authors': 'OFKM Technologies'
- 'org.opencontainers.image.url': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.documentation': 'https://github.com/getarcaneapp/arcane/blob/main/README.md'
- 'org.opencontainers.image.source': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.version': '{{.Version}}'
- 'org.opencontainers.image.revision': '{{.FullCommit}}'
- 'org.opencontainers.image.licenses': 'BSD-3-Clause'
- 'org.opencontainers.image.title': 'Arcane Agent'
- 'org.opencontainers.image.description': 'Arcane Agent'
- 'com.getarcaneapp.arcane.agent': 'true'
+ "org.opencontainers.image.authors": "OFKM Technologies"
+ "org.opencontainers.image.url": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.documentation": "https://github.com/getarcaneapp/arcane/blob/main/README.md"
+ "org.opencontainers.image.source": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.version": "{{.Version}}"
+ "org.opencontainers.image.revision": "{{.FullCommit}}"
+ "org.opencontainers.image.licenses": "BSD-3-Clause"
+ "org.opencontainers.image.title": "Arcane Agent"
+ "org.opencontainers.image.description": "Arcane Agent"
+ "com.getarcaneapp.arcane.agent": "true"
disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
sbom: true
@@ -213,25 +235,25 @@ dockers_v2:
- arcane
dockerfile: docker/next-builds/Dockerfile-next-distroless
images:
- - 'ghcr.io/getarcaneapp/arcane'
+ - "ghcr.io/getarcaneapp/arcane"
tags:
- - 'next-distroless'
- - '{{.Tag}}-distroless'
+ - "next-distroless"
+ - "{{.Tag}}-distroless"
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
labels:
- 'org.opencontainers.image.authors': 'OFKM Technologies'
- 'org.opencontainers.image.url': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.documentation': 'https://github.com/getarcaneapp/arcane/blob/main/README.md'
- 'org.opencontainers.image.source': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.version': '{{.Version}}'
- 'org.opencontainers.image.revision': '{{.FullCommit}}'
- 'org.opencontainers.image.licenses': 'BSD-3-Clause'
- 'org.opencontainers.image.title': 'Arcane'
- 'org.opencontainers.image.description': 'Modern Docker Management, Made for Everyone'
- 'com.getarcaneapp.arcane': 'true'
+ "org.opencontainers.image.authors": "OFKM Technologies"
+ "org.opencontainers.image.url": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.documentation": "https://github.com/getarcaneapp/arcane/blob/main/README.md"
+ "org.opencontainers.image.source": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.version": "{{.Version}}"
+ "org.opencontainers.image.revision": "{{.FullCommit}}"
+ "org.opencontainers.image.licenses": "BSD-3-Clause"
+ "org.opencontainers.image.title": "Arcane"
+ "org.opencontainers.image.description": "Modern Docker Management, Made for Everyone"
+ "com.getarcaneapp.arcane": "true"
disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
sbom: true
@@ -240,25 +262,25 @@ dockers_v2:
- arcane-agent
dockerfile: docker/next-builds/Dockerfile-agent-distroless
images:
- - 'ghcr.io/getarcaneapp/arcane-headless'
+ - "ghcr.io/getarcaneapp/arcane-headless"
tags:
- - 'next-distroless'
- - '{{.Tag}}-distroless'
+ - "next-distroless"
+ - "{{.Tag}}-distroless"
platforms:
- linux/amd64
- linux/arm64
- linux/arm/v7
labels:
- 'org.opencontainers.image.authors': 'OFKM Technologies'
- 'org.opencontainers.image.url': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.documentation': 'https://github.com/getarcaneapp/arcane/blob/main/README.md'
- 'org.opencontainers.image.source': 'https://github.com/getarcaneapp/arcane'
- 'org.opencontainers.image.version': '{{.Version}}'
- 'org.opencontainers.image.revision': '{{.FullCommit}}'
- 'org.opencontainers.image.licenses': 'BSD-3-Clause'
- 'org.opencontainers.image.title': 'Arcane Agent'
- 'org.opencontainers.image.description': 'Arcane Agent'
- 'com.getarcaneapp.arcane.agent': 'true'
+ "org.opencontainers.image.authors": "OFKM Technologies"
+ "org.opencontainers.image.url": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.documentation": "https://github.com/getarcaneapp/arcane/blob/main/README.md"
+ "org.opencontainers.image.source": "https://github.com/getarcaneapp/arcane"
+ "org.opencontainers.image.version": "{{.Version}}"
+ "org.opencontainers.image.revision": "{{.FullCommit}}"
+ "org.opencontainers.image.licenses": "BSD-3-Clause"
+ "org.opencontainers.image.title": "Arcane Agent"
+ "org.opencontainers.image.description": "Arcane Agent"
+ "com.getarcaneapp.arcane.agent": "true"
disable: '{{ if not (index .Env "BUILD_NEXT") }}true{{ end }}'
sbom: true
@@ -277,7 +299,7 @@ release:
prerelease: auto
make_latest: true
mode: keep-existing
- name_template: '{{.Tag}}'
+ name_template: "{{.Tag}}"
footer: |
---
diff --git a/backend/go.sum b/backend/go.sum
index 06cdccb2f..676d457a4 100644
--- a/backend/go.sum
+++ b/backend/go.sum
@@ -502,6 +502,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.4 h1:TsZE7l11zFCLZnZ+teH4Umoq5BhEIfIzfRDZ1Uzql2w=
+github.com/sirupsen/logrus v1.9.4/go.mod h1:ftWc9WdOfJ0a92nsE2jF5u5ZwH8Bv2zdeOC42RjbV2g=
github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8=
github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=