From b79850d96ee74d0d91af8d9039330711478e0a03 Mon Sep 17 00:00:00 2001 From: s1ntaxe770r Date: Sat, 13 Mar 2021 22:56:13 +0100 Subject: [PATCH] updates goreleaser --- .github/workflows/goreleaser.yml | 51 ++++++++++++++++---------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index fe45c3d..88edf8d 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -1,28 +1,27 @@ -name: goreleaser - +name: release on: - pull_request: - push: - +push: +branches: + - master +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.16 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GR_TOKEN }} +goreleaser: +runs-on: ubuntu-latest +steps: + - name: Checkout Repository +uses: actions/checkout@v2 +with: +fetch-depth: 0 + - name: Set up Go +uses: actions/setup-go@v2 +with: +go-version: 1.16 + - name: Run goreleaser +uses: goreleaser/goreleaser-action@v2 +if: startsWith(github.ref, 'refs/tags/') +with: +version: latest +args: release --rm-dist +env: +GITHUB_TOKEN: ${{ secrets.GR_TOKEN }} \ No newline at end of file