From 86c3c28fc2ef159f6bb790354a2305a724d13d37 Mon Sep 17 00:00:00 2001 From: Yann Soubeyrand Date: Sat, 3 Oct 2020 17:41:47 +0200 Subject: [PATCH] ci: add goreleaser configuration --- .github/workflows/release.yaml | 27 +++++++++++++++++++++++++++ .gitignore | 1 + .goreleaser.yml | 21 +++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 .github/workflows/release.yaml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..13725aa --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,27 @@ +name: "Release" + +on: + push: + tags: + - "*" + +jobs: + goreleaser: + runs-on: "ubuntu-latest" + steps: + - name: "Checkout source code" + uses: "actions/checkout@v2" + with: + fetch-depth: 0 + - name: "Set up Go" + uses: "actions/setup-go@v2" + with: + go-version: "1.13" + - name: "Run GoReleaser" + uses: "goreleaser/goreleaser-action@v2" + with: + version: "latest" + args: "release --rm-dist" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + diff --git a/.gitignore b/.gitignore index 8914837..725c021 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +dist/ helm-sops diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..5e11d12 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,21 @@ +project_name: "helm-sops" + +before: + hooks: + - "go mod download" + +builds: + - binary: "helm-sops" + flags: "-trimpath" + ldflags: "-s -w" + mod_timestamp: "{{ $.CommitTimestamp }}" + env: + - "CGO_ENABLED=0" + +release: + prerelease: "auto" + +changelog: + filters: + exclude: + - "^(refactor|style|test|docs|ci)(\\([^)]+\\))?(!)?:"