-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
江鹏飞
committed
Jul 22, 2023
1 parent
96a2241
commit 4b96a3a
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Build with xgo | ||
uses: crazy-max/ghaction-xgo@v2 | ||
with: | ||
xgo_version: latest | ||
go_version: ${{ matrix.go_version }} | ||
dest: build | ||
prefix: thriftls | ||
targets: windows/386,windows/amd64,linux/386,linux/amd64,darwin/386,darwin/amd64 | ||
v: true | ||
x: false | ||
race: false | ||
ldflags: -s -w | ||
buildmode: default | ||
|
||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Development Build" | ||
files: | | ||
build/thriftls* | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "tagged-release" | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
tagged-release: | ||
name: "Tagged Release" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19 | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Build with xgo | ||
uses: crazy-max/ghaction-xgo@v2 | ||
with: | ||
xgo_version: latest | ||
go_version: ${{ matrix.go_version }} | ||
dest: build | ||
prefix: kubecm | ||
targets: windows/386,windows/amd64,linux/386,linux/amd64,darwin/386,darwin/amd64 | ||
v: true | ||
x: false | ||
race: false | ||
ldflags: -s -w | ||
buildmode: default | ||
|
||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false | ||
files: | | ||
build/thriftls* | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters