From 69d66dc6033e25a8c74e352a6c1d2843cca39527 Mon Sep 17 00:00:00 2001 From: el-virt Date: Wed, 21 May 2025 21:53:58 -0600 Subject: [PATCH 1/4] chore(ci): DSPX-850 - Add workflows to support LTS releases --- .github/workflows/release.yaml | 18 +++++------------- release-please_main-branch.json | 17 +++++++++++++++++ ...son => release-please_release-branches.json | 1 - 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 release-please_main-branch.json rename release-please.json => release-please_release-branches.json (93%) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7352d6b1..ae255d0c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,6 +4,7 @@ on: push: branches: - main + - "release/*" release: types: [created] @@ -13,19 +14,10 @@ permissions: jobs: release-please: - runs-on: ubuntu-latest - steps: - - name: Generate a token - id: generate_token - uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 - with: - app-id: "${{ secrets.APP_ID }}" - private-key: "${{ secrets.AUTOMATION_KEY }}" - - uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0 - with: - token: "${{ steps.generate_token.outputs.token }}" - config-file: release-please.json - manifest-file: .release-please-manifest.json + permissions: + contents: write + pull-requests: write + uses: opentdf/platform/reusable_release-please.yaml@main release: runs-on: ubuntu-latest steps: diff --git a/release-please_main-branch.json b/release-please_main-branch.json new file mode 100644 index 00000000..55a6077b --- /dev/null +++ b/release-please_main-branch.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "release-type": "maven", + "bump-minor-pre-major": true, + "separate-pull-requests": false, + "include-component-in-tag": false, + "group-pull-request-title-pattern": "chore(${branch}): release ${version}", + "packages": { + ".": {} + }, + "extra-files": [ + { + "type": "generic", + "path": "cmdline/src/main/java/io/opentdf/platform/Command.java" + } + ] +} diff --git a/release-please.json b/release-please_release-branches.json similarity index 93% rename from release-please.json rename to release-please_release-branches.json index 78f10bf8..b55f2686 100644 --- a/release-please.json +++ b/release-please_release-branches.json @@ -1,7 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", "release-type": "maven", - "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, "separate-pull-requests": false, "include-component-in-tag": false, From f2867e273a6a41e6578388307ef18a7cdda138e5 Mon Sep 17 00:00:00 2001 From: el-virt Date: Wed, 21 May 2025 22:14:52 -0600 Subject: [PATCH 2/4] fix --- .github/workflows/backport.yaml | 26 ++++++++++++++++++++ .github/workflows/create-release-branch.yaml | 15 +++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/backport.yaml create mode 100644 .github/workflows/create-release-branch.yaml diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml new file mode 100644 index 00000000..bc0f8f7c --- /dev/null +++ b/.github/workflows/backport.yaml @@ -0,0 +1,26 @@ +name: "Backport merged pull request" +on: + pull_request: + types: [closed] + issue_comment: + types: [created] + +# Default empty permissions for all jobs +permissions: {} + +jobs: + backport: + permissions: + contents: write + pull-requests: write + id-token: write + if: | + ( + github.event_name == 'pull_request' && + github.event.pull_request.merged + ) || ( + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + startsWith(github.event.comment.body, '/backport') + ) + uses: opentdf/platform/reusable_backport.yaml@main diff --git a/.github/workflows/create-release-branch.yaml b/.github/workflows/create-release-branch.yaml new file mode 100644 index 00000000..def42c8e --- /dev/null +++ b/.github/workflows/create-release-branch.yaml @@ -0,0 +1,15 @@ +name: "Create Release Branch" + +on: + release: + types: [released] + +# Default empty permissions for all jobs +permissions: {} + +jobs: + create-release-branch: + if: ${{ endsWith(github.event.release.tag_name, '.0') }} + permissions: + id-token: write + uses: opentdf/platform/reusable_create-release-branch.yaml@main From 5039a8a2df9396a40a47d6a69b379799d0f8c143 Mon Sep 17 00:00:00 2001 From: el-virt Date: Fri, 23 May 2025 11:43:05 -0600 Subject: [PATCH 3/4] fix --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ae255d0c..e75d3139 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,7 @@ on: push: branches: - main - - "release/*" + - "release/**" release: types: [created] From fb915900599fa51d2913a380aab285cb67707e9d Mon Sep 17 00:00:00 2001 From: el-virt Date: Thu, 29 May 2025 16:27:57 -0600 Subject: [PATCH 4/4] fix --- release-please_release-branches.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release-please_release-branches.json b/release-please_release-branches.json index b55f2686..6177d966 100644 --- a/release-please_release-branches.json +++ b/release-please_release-branches.json @@ -1,7 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", "release-type": "maven", - "bump-patch-for-minor-pre-major": true, + "versioning": "always-bump-patch", "separate-pull-requests": false, "include-component-in-tag": false, "group-pull-request-title-pattern": "chore(${branch}): release ${version}",