Skip to content

Commit

Permalink
fixup! Run goreleaser on merge to main
Browse files Browse the repository at this point in the history
Signed-off-by: Aidan Delaney <adelaney21@bloomberg.net>
  • Loading branch information
AidanDelaney committed Mar 9, 2023
1 parent acf7a15 commit f9a02fe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: write

jobs:

build:
Expand All @@ -26,12 +23,3 @@ jobs:

- name: Test
run: go test -v ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: goreleaser

on:
pull_request:
branches:
- main
types: [closed]
paths-ignore:
- '**.md'
- 'resources/**'
- 'CODEOWNERS'
- 'LICENSE'

permissions:
contents: write

jobs:
goreleaser:
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f9a02fe

Please sign in to comment.