From b8acc8ad15d508dc0301e0c8f7448d1befa0294a Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 16 Mar 2023 13:36:39 +0100 Subject: [PATCH] Fix goreleaser (#135) --- .github/workflows/build.yml | 5 ++--- .goreleaser.yml | 11 +++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ce0bb7..32bbb60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,6 @@ jobs: build: name: Build OS-Agent runs-on: ubuntu-latest - container: buildpack-deps:buster steps: - name: Checkout the repository uses: actions/checkout@v3.4.0 @@ -29,12 +28,12 @@ jobs: uses: goreleaser/goreleaser-action@v4.2.0 if: github.event_name == 'pull_request' with: - args: build --snapshot --rm-dist + args: build --snapshot --clean - name: Run GoReleaser release uses: goreleaser/goreleaser-action@v4.2.0 if: github.event_name == 'release' with: - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index baa6fea..57cf99f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -42,10 +42,13 @@ nfpms: - deb dependencies: - udisks2 - replacements: - 386: i386 - amd64: x86_64 - arm64: aarch64 + file_name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else if eq .Arch "arm64" }}aarch64 + {{- else }}{{ .Arch }}{{ end }} contents: - src: contrib/haos-agent.service dst: /usr/lib/systemd/system/haos-agent.service