Merge pull request #151 from helmfile/release-automation

Release automation and release build testing
This commit is contained in:
yxxhero 2022-06-10 10:37:40 +08:00 committed by GitHub
commit fb8a7f0bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 0 deletions

29
.github/workflows/publish_binaries.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Publish Binaries
on:
push:
branches:
- "!*"
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v1
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ~1.18.1
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,26 @@
name: Test Binary Builds
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v1
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ~1.18.1
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist --snapshot

18
.goreleaser.yml Normal file
View File

@ -0,0 +1,18 @@
project_name: helmfile
builds:
- id: helmfile
main: .
env:
- CGO_ENABLED=0
ldflags:
- -s -w -X github.com/helmfile/helmfile/pkg/app/version.Version={{.Version}}
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64
- "386"
changelog:
use: github-native