From 4e937e5284a27d308f7b0f9bb415cd6b46211b48 Mon Sep 17 00:00:00 2001 From: rmb122 Date: Sat, 1 Oct 2022 12:13:02 +0800 Subject: [PATCH] feat: release action --- .github/workflows/release.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..51d6ae8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,30 @@ +on: + release: + types: [created] + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, windows, darwin] + goarch: ["386", "amd64", "arm64"] + exclude: + - goarch: "386" + goos: darwin + + steps: + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1.32 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "1.19" + pre_command: "export CGO_ENABLED=0" + binary_name: "rogue_mysql_server" + extra_files: config.yaml README.md + compress_assets: zip + build_flags: "-trimpath" + ldflags: "-s -w"