From 05369cc8d9286204644dbaebe133d3b81d6e424e Mon Sep 17 00:00:00 2001 From: "mkeeler@launchdarkly.com" Date: Mon, 6 Apr 2026 16:46:21 +0000 Subject: [PATCH] ci: split release-please into independent release and PR creation steps --- .github/workflows/release-please.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 0f42435a..95bc6a8d 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -17,8 +17,37 @@ jobs: release-created: ${{ steps.release.outputs.release_created }} steps: + # Create any releases first, then create tags, and then optionally create any new PRs. - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 id: release + with: + skip-github-pull-request: true + + # Need the repository content to be able to create and push a tag. + - uses: actions/checkout@v4 + if: ${{ steps.release.outputs.release_created == 'true' }} + + - name: Create release tag + if: ${{ steps.release.outputs.release_created == 'true' }} + env: + TAG_NAME: ${{ steps.release.outputs.tag_name }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if gh api "repos/${{ github.repository }}/git/ref/tags/${TAG_NAME}" >/dev/null 2>&1; then + echo "Tag ${TAG_NAME} already exists, skipping creation." + else + echo "Creating tag ${TAG_NAME}." + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag "${TAG_NAME}" + git push origin "${TAG_NAME}" + fi + + - uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0 + if: ${{ steps.release.outputs.release_created != 'true' }} + id: release-prs + with: + skip-github-release: true build-ruby-gem: needs: ["release-package"]