Skip to content

Commit

Permalink
build: update goreleaser config
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag committed Jun 30, 2023
1 parent 237118d commit 4a900e3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- "v*"

jobs:
release:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
Expand All @@ -24,10 +24,10 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.6.1
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }}
61 changes: 28 additions & 33 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
project_name: guardian

release:
prerelease: auto

before:
hooks:
- go mod tidy
- make clean

changelog:
use: github
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"

builds:
- id: "guardian"
main: ./main.go
binary: guardian
flags:
- -a
flags: [-a]
ldflags:
- -X github.com/raystack/guardian/core.Version={{.Tag}}
- -X github.com/raystack/guardian/core.BuildCommit={{.FullCommit}}
Expand All @@ -19,37 +30,20 @@ builds:
goarch: [amd64, 386, arm, arm64]
env:
- CGO_ENABLED=0

archives:
- replacements:
darwin: macos
linux: linux
windows: windows
386: i386
amd64: x86_64
- id: "archives"
format_overrides:
- goos: windows
format: zip
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^build:"
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"

dockers:
- goos: linux
goarch: amd64
ids:
- guardian
dockerfile: Dockerfile
- id: dockerhub
image_templates:
- "docker.io/raystack/{{.ProjectName}}:latest"
- "docker.io/raystack/{{.ProjectName}}:{{ .Version }}"
- "docker.io/raystack/{{.ProjectName}}:{{ .Tag }}-amd64"

nfpms:
- maintainer: Raystack
description: Universal data access tool
Expand All @@ -58,15 +52,16 @@ nfpms:
formats:
- deb
- rpm
replacements:
darwin: macOS
scoop:
bucket:
owner: raystack
name: scoop-bucket
homepage: "https://github.com/raystack/guardian"
description: "Universal data access tool"
license: Apache 2.0
- apk

scoops:
- homepage: "https://github.com/raystack/guardian"
description: "Universal data access tool"
license: Apache 2.0
bucket:
owner: raystack
name: scoop-bucket

brews:
- name: guardian
homepage: "https://github.com/raystack/guardian"
Expand Down

0 comments on commit 4a900e3

Please sign in to comment.