From 447a84f9ba36c9276386b95a6bd75c44e14cdec9 Mon Sep 17 00:00:00 2001 From: togettoyou Date: Tue, 30 Nov 2021 10:42:40 +0800 Subject: [PATCH] build --- .github/workflows/goreleaser.yml | 27 +++++++++++++++++++++++++++ .github/workflows/release.yml | 26 -------------------------- install.sh | 1 + uninstall.sh | 1 + 4 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/goreleaser.yml delete mode 100644 .github/workflows/release.yml create mode 100644 install.sh create mode 100644 uninstall.sh diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..54fde3a --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + push: + tags: + - '*' + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f482b6f..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: - release: - types: [created] - -jobs: - releases-matrix: - name: Release Go Binary - runs-on: ubuntu-latest - strategy: - matrix: - # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 - goos: [linux, windows, darwin] - goarch: ["386", amd64, arm64] - exclude: - - goarch: "386" - goos: darwin - - goarch: arm64 - goos: windows - steps: - - uses: actions/checkout@v2 - - uses: wangyoucao577/go-release-action@v1.22 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goos: ${{ matrix.goos }} - goarch: ${{ matrix.goarch }} - extra_files: LICENSE README.md diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..cc1f786 --- /dev/null +++ b/install.sh @@ -0,0 +1 @@ +#!/bin/bash \ No newline at end of file diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..cc1f786 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1 @@ +#!/bin/bash \ No newline at end of file