Skip to content

Commit d0adee6

Browse files
committed
Add go releaser
1 parent 4913ad1 commit d0adee6

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

.github/workflows/release.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
jobs:
7+
goreleaser:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
packages: write
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-go@v5
18+
with:
19+
go-version-file: 'go.mod'
20+
- uses: goreleaser/goreleaser-action@v6
21+
with:
22+
args: release --clean
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist

.goreleaser.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
version: 2
3+
4+
project_name: gh-cherry-pick
5+
6+
builds:
7+
- id: gh-cherry-pick
8+
binary: gh-cherry-pick
9+
main: ./cmd/cherry-pick/
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- darwin
14+
- windows
15+
- linux
16+
goarch:
17+
- amd64
18+
- arm64
19+
20+
- id: gh-pr-merged-with
21+
binary: gh-pr-merged-with
22+
main: ./cmd/pr-merged-with/
23+
env:
24+
- CGO_ENABLED=0
25+
goos:
26+
- darwin
27+
- windows
28+
- linux
29+
goarch:
30+
- amd64
31+
- arm64
32+
33+
archives:
34+
- format: tar.gz
35+
wrap_in_directory: true
36+
name_template: "{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}"
37+
files:
38+
- LICENSE
39+
- README.md
40+
41+
snapshot:
42+
version_template: "SNAPSHOT-{{ .Commit }}"

0 commit comments

Comments
 (0)