Skip to content

Commit

Permalink
goreleaser update
Browse files Browse the repository at this point in the history
  • Loading branch information
tolgaOzen committed Oct 20, 2022
1 parent 43e9fae commit 876b953
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 67 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ jobs:
with:
fetch-depth: 0
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Log in to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }}
- name: Install Go
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.18
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
134 changes: 70 additions & 64 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,94 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
---
project_name: permify
universal_binaries:
- replace: true
builds:
- main: "./cmd/permify"
-
env:
- CGO_ENABLED=0
goos:
- "linux"
- "windows"
- "darwin"
goarch:
- "amd64"
- "arm64"
mod_timestamp: '{{ .CommitTimestamp }}'
- amd64
- arm64
goos:
- linux
- windows
- darwin
ldflags:
- "-s -w"
nfpms:
- vendor: "permify inc."
homepage: "https://permify.co"
maintainer: "permify <help@permify.co>"
description: "Permify is an open-source authorization service & policy engine based on Google Zanzibar."
license: "GNU General Public License v3.0"
formats:
- "deb"
- "rpm"
- "apk"
main: ./cmd/permify
mod_timestamp: "{{ .CommitTimestamp }}"
brews:
- tap:
owner: "permify"
name: "homebrew-tap"
branch: main
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
url_template: "https://github.com/Permify/permify/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
download_strategy: "CurlDownloadStrategy"
-
dependencies:
-
name: go
type: build
description: "Permify is an open-source authorization service & policy engine based on Google Zanzibar."
download_strategy: CurlDownloadStrategy
folder: Formula
commit_author:
name: "permify-bot"
email: "hello@permify.co"
homepage: "https://github.com/Permify/permify"
description: "Permify is an open-source authorization service & policy engine based on Google Zanzibar."
license: "GNU General Public License v3.0"
dependencies:
- name: "go"
type: "build"
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
custom_block: |
head "https://github.com/Permify/permify.git", :branch => "master"
install: |
if !File.exists? "permify"
system "go build ./cmd/permify"
end
bin.install "permify"
if !File.exists? "permify"
system "go build --ldflags ./cmd/permify"
end
bin.install "permify"
tap:
name: homebrew-tap
owner: permify
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_author:
name: permify-bot
email: hello@permify.co
url_template: "https://github.com/Permify/permify/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
docker_manifests:
-
image_templates:
- "ghcr.io/permify/permify:v{{ .Version }}-amd64"
- "ghcr.io/permify/permify:v{{ .Version }}-arm64"
name_template: "ghcr.io/permify/permify:v{{ .Version }}"
-
image_templates:
- "ghcr.io/permify/permify:v{{ .Version }}-amd64"
- "ghcr.io/permify/permify:v{{ .Version }}-arm64"
name_template: "ghcr.io/permify/permify:latest"
dockers:
# ARM64
- image_templates:
- ghcr.io/permify/permify:v{{ .Version }}-arm64
dockerfile: Dockerfile.release
-
build_flag_templates:
- "--platform=linux/arm64"
dockerfile: Dockerfile.release
goarch: arm64
image_templates:
- "ghcr.io/permify/permify:v{{ .Version }}-arm64"
use: buildx
-
build_flag_templates:
- --platform=linux/arm64
# AMD64
- image_templates:
- ghcr.io/permify/permify:v{{ .Version }}-amd64
- "--platform=linux/amd64"
dockerfile: Dockerfile.release
use: buildx
goarch: amd64
build_flag_templates:
- --platform=linux/amd64
docker_manifests:
# GitHub Registry
- name_template: ghcr.io/permify/permify:v{{ .Version }}
image_templates:
- ghcr.io/permify/permify:v{{ .Version }}-amd64
- ghcr.io/permify/permify:v{{ .Version }}-arm64
- name_template: ghcr.io/permify/permify:latest
image_templates:
- ghcr.io/permify/permify:v{{ .Version }}-amd64
- ghcr.io/permify/permify:v{{ .Version }}-arm64
checksum:
name_template: 'checksums.txt'
- "ghcr.io/permify/permify:v{{ .Version }}-amd64"
use: buildx
nfpms:
-
description: "Permify is an open-source authorization service & policy engine based on Google Zanzibar."
formats:
- deb
- rpm
- apk
homepage: "https://permify.co"
license: "GNU General Public License v3.0"
maintainer: "permify <help@permify.co>"
vendor: "permify inc."
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"
checksum:
name_template: checksums.txt

0 comments on commit 876b953

Please sign in to comment.