From 49d2f26192478cc05122c12bfb59a40960173319 Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 4 Apr 2023 10:50:35 -0300 Subject: [PATCH 1/4] goreleaser init --- .gitignore | 2 ++ .goreleaser.yaml | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .goreleaser.yaml diff --git a/.gitignore b/.gitignore index 3cfd1857..27363f84 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ testbin/* *~ site/ + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 00000000..82a80dbf --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,13 @@ +builds: + - skip: true + +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' From cba70ab79489767be724572db13f8568785af388 Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 4 Apr 2023 11:17:17 -0300 Subject: [PATCH 2/4] add goreleaser steps on release workflow --- .github/workflows/release.yaml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f178d6d9..512c65d2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,6 +5,10 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+*" +permissions: + contents: write + packages: write + env: CHARTS_REPOSITORY_PATH: charts.undistro.io CHART_PATH: charts/zora @@ -16,10 +20,38 @@ jobs: docker: uses: ./.github/workflows/docker.yaml secrets: inherit + + goreleaser: + name: Create GitHub release + runs-on: ubuntu-latest + needs: [docker] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Fetch tags + run: git fetch --force --tags + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + + - name: Release + uses: goreleaser/goreleaser-action@v4 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + helm: name: Update Helm repository runs-on: ubuntu-latest - needs: [docker] + needs: [goreleaser] steps: - name: Checkout repository uses: actions/checkout@v3 From 78bc4ab9a3ec07bc6a2efbcbd776532d0372b62b Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 4 Apr 2023 12:32:01 -0300 Subject: [PATCH 3/4] auto prerelease --- .goreleaser.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 82a80dbf..352a3880 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -11,3 +11,5 @@ changelog: exclude: - '^docs:' - '^test:' +release: + prerelease: auto From d9218d7974a6ab06a5d9b2e090cb3ac065facb90 Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 4 Apr 2023 16:15:53 -0300 Subject: [PATCH 4/4] add copyright --- .goreleaser.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 352a3880..38f91546 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,3 +1,17 @@ +# Copyright 2023 Undistro Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + builds: - skip: true