From 51507a555b52659bffc527f06dbbd90c3488ae08 Mon Sep 17 00:00:00 2001 From: mlsmaycon Date: Thu, 22 Apr 2021 00:20:11 +0200 Subject: [PATCH] enable release publish on tag --- .github/workflows/release.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cab32cffe..6e9b30a94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,21 +1,19 @@ -name: release +name: Release on: push: - branches: - - main tags: - 'v*' jobs: - build: + release: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: 0 + fetch-depth: 0 # It is required for GoReleaser to work properly - name: Set up Go uses: actions/setup-go@v2 @@ -35,13 +33,9 @@ jobs: - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 - #if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') with: version: latest - args: --snapshot --skip-publish --rm-dist + args: release --rm-dist env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - - name: Check dist directory - run: ls -lhR dist/ \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file