Skip to content

Commit

Permalink
build: build snapshots except when on a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Sep 17, 2024
1 parent 9f1c307 commit a24a191
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: goreleaser

on:
workflow_dispatch:
pull_request:
push:

Expand All @@ -11,20 +12,20 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Set Vars
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: echo "GORELEASER_FLAGS=--snapshot" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v5
-
name: Run GoReleaser
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
args: release --clean ${{ env.GORELEASER_FLAGS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a24a191

Please sign in to comment.