Skip to content

Commit a77a401

Browse files
el-virtstrantalis
andauthored
chore(ci): DSPX-850 - Add workflows to support LTS releases (#260)
Co-authored-by: Sean Trantalis <18211470+strantalis@users.noreply.github.com>
1 parent 65ca764 commit a77a401

File tree

5 files changed

+63
-14
lines changed

5 files changed

+63
-14
lines changed

.github/workflows/backport.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Backport merged pull request"
2+
on:
3+
pull_request:
4+
types: [closed]
5+
issue_comment:
6+
types: [created]
7+
8+
# Default empty permissions for all jobs
9+
permissions: {}
10+
11+
jobs:
12+
backport:
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
id-token: write
17+
if: |
18+
(
19+
github.event_name == 'pull_request' &&
20+
github.event.pull_request.merged
21+
) || (
22+
github.event_name == 'issue_comment' &&
23+
github.event.issue.pull_request &&
24+
startsWith(github.event.comment.body, '/backport')
25+
)
26+
uses: opentdf/platform/reusable_backport.yaml@main
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "Create Release Branch"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
# Default empty permissions for all jobs
8+
permissions: {}
9+
10+
jobs:
11+
create-release-branch:
12+
if: ${{ endsWith(github.event.release.tag_name, '.0') }}
13+
permissions:
14+
id-token: write
15+
uses: opentdf/platform/reusable_create-release-branch.yaml@main

.github/workflows/release.yaml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- "release/**"
78
release:
89
types: [created]
910

@@ -13,19 +14,10 @@ permissions:
1314

1415
jobs:
1516
release-please:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- name: Generate a token
19-
id: generate_token
20-
uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0
21-
with:
22-
app-id: "${{ secrets.APP_ID }}"
23-
private-key: "${{ secrets.AUTOMATION_KEY }}"
24-
- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
25-
with:
26-
token: "${{ steps.generate_token.outputs.token }}"
27-
config-file: release-please.json
28-
manifest-file: .release-please-manifest.json
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
uses: opentdf/platform/reusable_release-please.yaml@main
2921
release:
3022
runs-on: ubuntu-latest
3123
steps:

release-please.json renamed to release-please_main-branch.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
33
"release-type": "maven",
44
"bump-minor-pre-major": true,
5-
"bump-patch-for-minor-pre-major": true,
65
"separate-pull-requests": false,
76
"include-component-in-tag": false,
87
"group-pull-request-title-pattern": "chore(${branch}): release ${version}",

release-please_release-branches.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "maven",
4+
"versioning": "always-bump-patch",
5+
"separate-pull-requests": false,
6+
"include-component-in-tag": false,
7+
"group-pull-request-title-pattern": "chore(${branch}): release ${version}",
8+
"packages": {
9+
".": {}
10+
},
11+
"extra-files": [
12+
{
13+
"type": "generic",
14+
"path": "cmdline/src/main/java/io/opentdf/platform/Command.java"
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)