Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: echo "flags=--snapshot" >> $GITHUB_ENV
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: true
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean ${{ env.flags }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# To test this manually, run:
# go install github.com/goreleaser/goreleaser@latest
# goreleaser --snapshot --clean
# for f in dist/helm-diff*.tgz; do echo Testing $f...; tar tzvf $f; done
project_name: helm-diff
builds:
- id: default
main: .
binary: bin/diff
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -X github.com/databus23/helm-diff/v3/cmd.Version={{ .Version }}
goos:
- freebsd
- darwin
- linux
- windows
goarch:
- amd64
- arm64

archives:
- id: default
builds:
- default
format: tgz
name_template: '{{ .ProjectName }}-{{ if eq .Os "darwin" }}macos{{ else }}{{ .Os }}{{ end }}-{{ .Arch }}'
wrap_in_directory: diff
files:
- README.md
- plugin.yaml
- LICENSE
changelog:
use: github-native

release:
prerelease: auto