Skip to content

Commit

Permalink
Add go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
cooper-oh committed Dec 16, 2024
1 parent 4913ad1 commit 5b0f9a6
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39 changes: 39 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

project_name: gh-cherry-pick

builds:
- binary: gh-cherry-pick
main: ./cmd/cherry-pick/
env:
- CGO_ENABLED=0
goos:
- darwin
- windows
- linux
goarch:
- amd64
- arm64
- binary: gh-pr-merged-with
main: ./cmd/pr-merged-with/
env:
- CGO_ENABLED=0
goos:
- darwin
- windows
- linux
goarch:
- amd64
- arm64

archives:
- format: tar.gz
wrap_in_directory: true
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ end }}"
files:
- LICENSE
- README.md

snapshot:
name_template: "SNAPSHOT-{{ .Commit }}"

0 comments on commit 5b0f9a6

Please sign in to comment.