Skip to content

Commit

Permalink
Add goreleaser (#212)
Browse files Browse the repository at this point in the history
* goreleaser init

* add goreleaser steps on release workflow

* auto prerelease

* add copyright
  • Loading branch information
matheusfm authored Apr 5, 2023
1 parent bf0fd60 commit 4388f93
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
34 changes: 33 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ testbin/*
*~

site/

dist/
29 changes: 29 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
prerelease: auto

0 comments on commit 4388f93

Please sign in to comment.