-
Notifications
You must be signed in to change notification settings - Fork 32
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
Showing
1 changed file
with
27 additions
and
95 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 |
---|---|---|
@@ -1,102 +1,34 @@ | ||
name: Release with goreleaser | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.* | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
releases-matrix-windows: | ||
name: Release Go Binary for windows | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [windows] | ||
goarch: [amd64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
pre_command: "bash ./src/rice-assets.sh" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: 1.16 | ||
project_path: "./src" | ||
ldflags: "-s -w" | ||
|
||
releases-matrix-linux: | ||
name: Release Go Binary for linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [linux] | ||
goarch: [386, amd64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
pre_command: "bash ./src/rice-assets.sh" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: 1.16 | ||
project_path: "./src" | ||
ldflags: "-s -w" | ||
|
||
releases-matrix-darwin: | ||
name: Release Go Binary for darwin | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [darwin] | ||
goarch: [amd64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
pre_command: "bash ./src/rice-assets.sh" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: 1.16 | ||
project_path: "./src" | ||
ldflags: "-s -w" | ||
|
||
releases-matrix-linux-withoutembedded: | ||
name: Release Go Binary for linux without any embedded files | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [linux] | ||
goarch: [386, amd64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
pre_command: "bash ./src/rice-assets.sh" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: 1.16 | ||
project_path: "./src" | ||
ldflags: "-s -w" | ||
binary_name: swego-without-embedded | ||
|
||
releases-matrix-darwin-withoutembedded: | ||
name: Release Go Binary for darwin without any embedded files | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
goos: [darwin] | ||
goarch: [amd64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
pre_command: "bash ./src/rice-assets.sh" | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: 1.16 | ||
project_path: "./src" | ||
ldflags: "-s -w" | ||
binary_name: swego-without-embedded | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.22 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
workdir: src | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |