Skip to content

Commit

Permalink
add goreleaser
Browse files Browse the repository at this point in the history
Signed-off-by: xhe <xw897002528@gmail.com>
  • Loading branch information
xhebox committed May 22, 2023
1 parent 2f5bfd8 commit 41cf999
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: goreleaser

on:
push:
tag:
- v*

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v4
with:
go-version: stable
# More assembly might be required: Docker logins, GPG, etc. It all depends
# on your needs.
- uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro':
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ work
.vscode/
.cover*
grafonnet-lib
dist
33 changes: 33 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
builds:
-
id: "tiproxy"
main: ./cmd/tiproxy
binary: tiproxy
ldflags:
- -s -w -X main.Version={{.Version}} -X main.commit={{.FullCommit}}
goos:
- linux
goarch:
- amd64
- arm64
goarm:
- 7
goamd64:
- v2
- v3
-
id: "tiproxyctl"
main: ./cmd/tiproxyctl
binary: tiproxyctl
ldflags:
- -s -w -X main.Version={{.Version}} -X main.commit={{.FullCommit}}
goos:
- linux
goarch:
- amd64
- arm64
goarm:
- 7
goamd64:
- v2
- v3

0 comments on commit 41cf999

Please sign in to comment.