From d6a4fcae1064858cf4bbfdfe30875d9e69c6f0c4 Mon Sep 17 00:00:00 2001 From: Javier Marcos <1271349+javuto@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:53:24 +0200 Subject: [PATCH] Packages for linux, macos y windows on release --- .github/workflows/ci-develop.yml | 2 +- .github/workflows/ci-main.yml | 2 +- .github/workflows/release.yml | 4 +- .goreleaser.yml | 95 +++++++++++++++++++++++++++++++- 4 files changed, 97 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index f8b479f..637bad7 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -55,4 +55,4 @@ jobs: with: distribution: goreleaser version: latest - args: release --snapshot --clean --skip=publish + args: release --snapshot --clean --skip=publish,nfpm,chocolatey,homebrew diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index c52cca6..637a320 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -55,4 +55,4 @@ jobs: with: distribution: goreleaser version: latest - args: release --snapshot --clean --skip=publish + args: release --snapshot --clean --skip=publish,nfpm,chocolatey,homebrew diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0699e07..f853180 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ permissions: jobs: goreleaser: - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v3 @@ -31,3 +31,5 @@ jobs: args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} + CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 2816115..0fc72b7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -34,13 +34,24 @@ builds: main: ./cmd/osctrld binary: osctrld - - id: osctrld-windows + - id: osctrld-windows-amd64 env: - CGO_ENABLED=0 goos: - windows goarch: - amd64 + ldflags: + - -s -w -X main.version={{.Version}} + main: ./cmd/osctrld + binary: osctrld + + - id: osctrld-windows-arm64 + env: + - CGO_ENABLED=0 + goos: + - windows + goarch: - arm64 ldflags: - -s -w -X main.version={{.Version}} @@ -52,12 +63,90 @@ archives: formats: ["binary"] name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" - - id: windows-archives + - id: darwin-archives ids: - - osctrld-windows + - osctrld-darwin + formats: ["tar.gz"] + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + + - id: windows-amd64-archive + ids: + - osctrld-windows-amd64 + formats: ["zip"] + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + + - id: windows-arm64-archive + ids: + - osctrld-windows-arm64 formats: ["zip"] name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" +nfpms: + - id: linux-packages + ids: + - osctrld-linux + package_name: osctrld + vendor: jmpsec + homepage: https://github.com/jmpsec/osctrld + maintainer: Javier Marcos + description: Daemon for osctrl, the fast and efficient osquery management. + license: MIT + formats: + - apk + - deb + - rpm + bindir: /usr/bin + contents: + - src: service/linux/systemd.service + dst: /lib/systemd/system/osctrld.service + - src: service/osctrld.yaml + dst: /etc/osctrld/osctrld.yaml + type: config|noreplace + +brews: + - name: osctrld + ids: + - darwin-archives + repository: + owner: jmpsec + name: homebrew-tap + branch: main + token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" + commit_author: + name: goreleaserbot + email: bot@goreleaser.com + directory: Formula + homepage: https://github.com/jmpsec/osctrld + description: Daemon for osctrl, the fast and efficient osquery management. + license: MIT + install: | + bin.install "osctrld" + test: | + system "#{bin}/osctrld", "--version" + +chocolateys: + - name: osctrld + ids: + - windows-amd64-archive + package_source_url: https://github.com/jmpsec/osctrld + owners: jmpsec + title: osctrld + authors: jmpsec + project_url: https://github.com/jmpsec/osctrld + license_url: https://github.com/jmpsec/osctrld/blob/main/LICENSE + project_source_url: https://github.com/jmpsec/osctrld + docs_url: https://github.com/jmpsec/osctrld/blob/main/README.md + bug_tracker_url: https://github.com/jmpsec/osctrld/issues + tags: osctrl osquery security daemon + summary: Daemon for osctrl, the fast and efficient osquery management. + description: | + osctrld is the daemon component for osctrl. It keeps osquery clients aligned + with their osctrl environment by managing flags, enrollment secrets, server + certificates, extensions, and local osquery restarts. + release_notes: "https://github.com/jmpsec/osctrld/releases/tag/{{ .Tag }}" + api_key: "{{ .Env.CHOCOLATEY_API_KEY }}" + source_repo: https://push.chocolatey.org/ + checksum: name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" algorithm: sha256