From 6b4c81f0aa5b28e52d1dfcaa20be0d29242361fe Mon Sep 17 00:00:00 2001 From: Cameron Cooper Date: Tue, 24 Sep 2024 14:21:25 -0500 Subject: [PATCH] build on pr but do not deploy --- .github/workflows/build-pr.yml | 27 +++++++++++++++++++++++++++ .github/workflows/release.yml | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-pr.yml diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 0000000..12af780 --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + pull_request: + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + environment: goreleaser + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + - name: Run GoReleaser (Build) + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: build --clean diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b472b98..86948fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,9 @@ name: goreleaser on: - pull_request: push: + branches: + - main tags: - "*"