From b52b1235903181e71202b035e15cd69c71580f7c Mon Sep 17 00:00:00 2001 From: Robert Jandow <38583713+robertjndw@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:21:19 +0200 Subject: [PATCH 1/2] Create release.yml with goreleaser --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..975b99d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +# .github/workflows/release.yml +name: goreleaser + +on: + pull_request: + push: + tags: + - "*" + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + # 'latest', 'nightly', or a semver + version: "~> v2" + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0087e3c1480ca82fe58b852b57ca1edc56fed199 Mon Sep 17 00:00:00 2001 From: Robert Jandow <38583713+robertjndw@users.noreply.github.com> Date: Wed, 26 Jun 2024 22:37:20 +0200 Subject: [PATCH 2/2] Update release.yml to only run on tags --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 975b99d..f8d786d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,6 @@ name: goreleaser on: - pull_request: push: tags: - "*"