From 925b751bb1fec07a85bd4a4b24b70b7e0052f6b9 Mon Sep 17 00:00:00 2001 From: Jonathan Seth Mainguy Date: Fri, 11 Aug 2023 08:33:46 -0400 Subject: [PATCH] chore: move to release-please --- .github/workflows/release-please.yaml | 37 +++++++++++++++++++++++++++ .github/workflows/release.yml | 28 -------------------- 2 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/release-please.yaml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml new file mode 100644 index 0000000..ba4f8a2 --- /dev/null +++ b/.github/workflows/release-please.yaml @@ -0,0 +1,37 @@ +name: release-please + +on: + push: + branches: + - main + +jobs: + release-please: + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release-please.outputs.release_created }} + steps: + - uses: google-github-actions/release-please-action@v3 + id: release-please + with: + release-type: go + + release: + runs-on: ubuntu-latest + needs: release-please + if: needs.release-please.outputs.release_created + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 25fc639..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,28 +0,0 @@ -on: - push: - tags: - - '*' - -name: release -jobs: - release: - name: run goreleaser - runs-on: ubuntu-latest - steps: - - name: git checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: install go - uses: actions/setup-go@v4 - with: - go-version: '1.19' - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}