Skip to content

Commit

Permalink
chore: add goreleaser
Browse files Browse the repository at this point in the history
Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
  • Loading branch information
shizhMSFT committed Jul 21, 2023
1 parent 1c66cd3 commit cb7614d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/release-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: release-github

on:
push:
tags:
- v*

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: setup go environment
uses: actions/setup-go@v4
with:
go-version: '1.20'
check-latest: true
- name: run goreleaser
uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Check the documentation at https://goreleaser.com for more options
builds:
- id: gha
main: ./cmd/gha
binary: gha
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
ignore:
- goos: windows
goarch: arm64
ldflags:
- -s -w
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
release:
prerelease: auto
draft: true

0 comments on commit cb7614d

Please sign in to comment.