From da7b40978d55a6afed4c3a1ca83a756238feaca8 Mon Sep 17 00:00:00 2001 From: Thomas Schuetz Date: Wed, 22 Mar 2023 15:38:40 +0100 Subject: [PATCH] chore: add release-please Signed-off-by: Thomas Schuetz --- .github/workflows/release.yaml | 35 +++++++++++++++++++++++++++++----- .goreleaser.yaml | 9 ++++----- .release-please-manifest.json | 1 + release-please-config.json | 0 4 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 32f6ef0b17..801edf77c7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -3,14 +3,39 @@ name: release on: push: branches: - - feature/gh-actions - tags: - - '*' -permissions: - contents: write + - main + - '[0-9]+.[0-9]+.x' + workflow_dispatch: + +defaults: + run: + shell: bash jobs: + release-please: + permissions: + contents: write # for google-github-actions/release-please-action to create release commit + pull-requests: write # for google-github-actions/release-please-action to create release PR + runs-on: ubuntu-latest + outputs: + releases_created: ${{ steps.release.outputs.releases_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + # Release-please creates a PR that tracks all changes + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: google-github-actions/release-please-action@v3 + id: release + with: + command: manifest + token: ${{secrets.GITHUB_TOKEN}} + default-branch: main + goreleaser: + if: needs.release-please.outputs.releases_created == 'true' + needs: + - release-please runs-on: ubuntu-latest steps: - diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a65edfee51..d5574b66d2 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -28,16 +28,15 @@ archives: format_overrides: - goos: windows format: zip + checksum: name_template: 'checksums.txt' + snapshot: name_template: "{{ incpatch .Version }}-next" + changelog: - sort: asc - filters: - exclude: - - '^docs:' - - '^test:' + skip: true # The lines beneath this are called `modelines`. See `:help modeline` # Feel free to remove those if you don't want/use them. diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000000..f87dfb208e --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{".":"0.0.2"} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000000..e69de29bb2