From 871ecbe9d587b78251d8c9a6d721e49cee4080c7 Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Thu, 14 Sep 2023 16:59:31 +0100 Subject: [PATCH] Add release PRs --- .github/workflows/release-pr.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/release-pr.yml diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml new file mode 100644 index 0000000..46afe83 --- /dev/null +++ b/.github/workflows/release-pr.yml @@ -0,0 +1,45 @@ +name: release-please +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + release-please: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: go + package-name: plugin-sdk + token: ${{ secrets.GH_CQ_BOT }} + pull-request-title-pattern: "chore${scope}: Release${component} v${version}" + - name: Parse semver string + if: steps.release.outputs.release_created + id: semver_parser + uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3 + with: + input_string: ${{ steps.release.outputs.tag_name }} + - name: Mark as pre-release + if: steps.semver_parser.outputs.prerelease != '' + uses: tubone24/update_release@1cfa79ccf7422570d9a9c6b6de749ff4b280e48b + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG_NAME: ${{ steps.release.outputs.tag_name }} + with: + prerelease: true + - name: Trigger Renovate + uses: actions/github-script@v6 + if: steps.release.outputs.release_created && steps.semver_parser.outputs.prerelease == '' + with: + github-token: ${{ secrets.GH_CQ_BOT }} + script: | + github.rest.actions.createWorkflowDispatch({ + owner: 'cloudquery', + repo: '.github', + workflow_id: 'renovate.yml', + ref: 'main', + })