Skip to content

Commit

Permalink
Update gorelease.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf authored May 22, 2024
1 parent e43b54a commit f606c3c
Showing 1 changed file with 27 additions and 95 deletions.
122 changes: 27 additions & 95 deletions .github/workflows/gorelease.yml
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 }}

0 comments on commit f606c3c

Please sign in to comment.