From 925945995351ca8b15a77d1c9e48431141219e57 Mon Sep 17 00:00:00 2001 From: Oliver Braun Date: Wed, 8 Mar 2023 16:55:49 +0100 Subject: [PATCH] fix go releaser --- .github/workflows/release.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eaf27a8..9db6974 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,27 +1,38 @@ name: goreleaser on: - pull_request: push: + # run only against tags tags: - "*" +permissions: + contents: write + # packages: write + # issues: write + jobs: goreleaser: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v2 + - run: git fetch --force --tags + - uses: actions/setup-go@v3 with: - go-version: 1.20 - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + go-version: ">=1.20.1" + cache: true + # More assembly might be required: Docker logins, GPG, etc. It all depends + # on your needs. + - uses: goreleaser/goreleaser-action@v4 with: + # either 'goreleaser' (default) or 'goreleaser-pro': + distribution: goreleaser version: latest - args: release --rm-dist + 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 }}