Skip to content

Commit 43c4d26

Browse files
committed
gorel
1 parent 6f395fd commit 43c4d26

File tree

2 files changed

+86
-20
lines changed

2 files changed

+86
-20
lines changed

.github/.goreleaser.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# See documentation at https://goreleaser.com/customization/build.
2+
project_name: jwtutil
3+
4+
builds:
5+
- id: jwtutil
6+
main: .
7+
binary: jwtutil
8+
goos:
9+
- darwin
10+
- linux
11+
- windows
12+
goarch:
13+
- amd64
14+
- arm64
15+
ldflags:
16+
- -s -w -X main.VERSION=v{{.Version}}
17+
18+
archives:
19+
- id: jwtutil
20+
builds:
21+
- jwtutil
22+
name_template: "{{ .Binary }}.{{ .Os }}-{{ .Arch }}"
23+
format: binary
24+
25+
checksum:
26+
name_template: "checksums.txt"
27+
28+
release:
29+
footer: |
30+
## Docker
31+
```
32+
$ docker pull ghcr.io/goware/jwtutil:v{{.Version}}
33+
```
34+
35+
Example: `$ docker run ghcr.io/goware/jwtutil`
36+
37+
## Homebrew
38+
```
39+
$ brew tap goware/tap
40+
$ brew install jwtutil
41+
$ jwtutil
42+
```
43+
44+
changelog:
45+
use: github
46+
sort: asc
47+
48+
brews:
49+
- name: jwtutil
50+
ids:
51+
- jwtutil
52+
tap:
53+
owner: goware
54+
name: homebrew-tap
55+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
56+
commit_author:
57+
name: goreleaserbot
58+
59+
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
60+
homepage: "https://github.com/goware/jwtutil"
61+
description: "handy little jwt debugging utility to encode/decode tokens"
62+
license: "MIT"

.github/workflows/release.yml

+24-20
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,31 @@ on:
1010
branches:
1111
- "**"
1212

13+
permissions:
14+
contents: write
15+
1316
jobs:
14-
# goreleaser:
15-
# runs-on: ubuntu-latest
16-
# steps:
17-
# - name: Checkout
18-
# uses: actions/checkout@v3
19-
# with:
20-
# fetch-depth: 0
21-
# - name: Set up Go
22-
# uses: actions/setup-go@v3
23-
# with:
24-
# go-version: 1.22
25-
# - name: Run GoReleaser
26-
# uses: goreleaser/goreleaser-action@v3
27-
# with:
28-
# distribution: goreleaser
29-
# version: latest
30-
# args: release -f .github/.goreleaser.yml --clean
31-
# env:
32-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
# HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
17+
goreleaser:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- name: Set up Go
25+
uses: actions/setup-go@v4
26+
with:
27+
go-version: 1.22
28+
- name: Run GoReleaser
29+
uses: goreleaser/goreleaser-action@v5
30+
with:
31+
distribution: goreleaser
32+
version: latest
33+
args: release -f .github/.goreleaser.yml --clean
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
37+
3438

3539
docker:
3640
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)