-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ">=1.21.0" | ||
cache: true | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
distribution: goreleaser | ||
version: "~> v2" | ||
args: release --clean --draft | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
debug.log | ||
diffnav | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj | ||
|
||
version: 2 | ||
|
||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of `uname`. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
|
||
brews: | ||
- name: diffnav | ||
|
||
# NOTE: make sure the url_template, the token and given repo (github or | ||
# gitlab) owner and name are from the same kind. | ||
# We will probably unify this in the next major version like it is | ||
# done with scoop. | ||
|
||
# URL which is determined by the given Token (github, gitlab or gitea). | ||
# | ||
# Default depends on the client. | ||
# Templates: allowed. | ||
url_template: "https://github.com/dlvhdr/diffnav/releases/download/{{ .Tag }}/{{ .ArtifactName }}" | ||
|
||
# Headers to include in the `url` stanza. | ||
# This can be a more modern alternative to `download_strategy` in some | ||
# cases. | ||
url_headers: | ||
- "Accept: application/octet-stream" | ||
- 'Authorization: bearer #{ENV["HOMEBREW_GITHUB_API_TOKEN"]}' | ||
|
||
download_strategy: CurlDownloadStrategy | ||
|
||
custom_require: custom_download_strategy | ||
|
||
commit_author: | ||
name: goreleaserbot | ||
email: [email protected] | ||
|
||
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" | ||
|
||
# Directory inside the repository to put the formula. | ||
directory: Formula | ||
|
||
homepage: "https://github.com/dlvhdr/diffnav" | ||
|
||
description: "A git diff pager based on delta but with a file tree, à la GitHub." | ||
|
||
license: "MIT" | ||
|
||
# Packages your package depends on. | ||
dependencies: | ||
- name: git | ||
- name: git-delta | ||
|
||
# Repository to push the generated files to. | ||
repository: | ||
owner: dlvhdr | ||
name: homebrew-formulae | ||
branch: main |