From 79298869a4878661972c64035b45aa5e2d2671b2 Mon Sep 17 00:00:00 2001 From: Rucciva Date: Tue, 18 Jun 2024 09:25:23 +0700 Subject: [PATCH] add go releaser --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ .goreleaser.yaml | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..68e548b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: rellease + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..29bc109 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,3 @@ +builds: + - id: main + main: ./cmd