diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 2e5812d..0323615 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -10,6 +10,8 @@ permissions: jobs: goreleaser: runs-on: ubuntu-latest + env: + flags: "" steps: - name: Checkout uses: actions/checkout@v4 @@ -35,11 +37,15 @@ jobs: make sudo make install + - name: Is snapshot? + if: ${{ !startsWith(github.ref, 'refs/tags/v') }} + run: echo "flags=--snapshot" >> $GITHUB_ENV + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: version: latest - args: release --clean + args: release --clean ${{ env.flags }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}