Skip to content

Commit 42e690b

Browse files
committed
chore: sdk-4992 migrate java sdk to release-please
1 parent 5ca7fb6 commit 42e690b

4 files changed

Lines changed: 79 additions & 1 deletion

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
release-please:
13+
name: Create or update release PR
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
steps:
18+
- name: Harden the runner (Audit all outbound calls)
19+
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
20+
with:
21+
egress-policy: audit
22+
23+
# Mint a short-lived GitHub App installation token per run instead of a
24+
# long-lived PAT. release-please needs a token other than the default
25+
# GITHUB_TOKEN so that the Release PR gets CI checks and downstream
26+
# release workflows can be triggered.
27+
- name: Generate GitHub App token
28+
id: generate-token
29+
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
30+
with:
31+
client-id: ${{ vars.RELEASE_APP_CLIENT_ID }}
32+
private-key: ${{ secrets.RELEASE_PRIVATE_KEY }}
33+
permission-contents: write
34+
permission-pull-requests: write
35+
36+
# Maintains a "Release PR" that aggregates conventional commits since the
37+
# last release. Merging that PR bumps the version, updates the changelog,
38+
# creates the git tag and the GitHub release.
39+
- name: Run release-please
40+
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
41+
with:
42+
token: ${{ steps.generate-token.outputs.token }}
43+
target-branch: master
44+
config-file: release-please-config.json
45+
manifest-file: .release-please-manifest.json

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "3.1.2"
3+
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</modules>
3838

3939
<properties>
40-
<revision>3.1.2</revision>
40+
<revision>3.1.2</revision> <!-- x-release-please-released-version -->
4141
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4242
<java.version>8</java.version>
4343
<kotlin.version>1.7.20</kotlin.version>

release-please-config.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "java",
4+
"include-component-in-tag": false,
5+
"pull-request-title-pattern": "chore: release ${version}",
6+
"always-update": true,
7+
"skip-snapshot": true,
8+
"changelog-sections": [
9+
{ "type": "feat", "section": "Features", "hidden": false },
10+
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
11+
{ "type": "perf", "section": "Performance Improvements", "hidden": false },
12+
{ "type": "deps", "section": "Dependencies", "hidden": false },
13+
{ "type": "revert", "section": "Reverts", "hidden": false },
14+
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
15+
{ "type": "ci", "section": "Miscellaneous", "hidden": false },
16+
{ "type": "build", "section": "Miscellaneous", "hidden": false },
17+
{ "type": "refactor", "section": "Miscellaneous", "hidden": false },
18+
{ "type": "test", "section": "Miscellaneous", "hidden": false },
19+
{ "type": "docs", "section": "Documentation", "hidden": false }
20+
],
21+
"packages": {
22+
".": {
23+
"package-name": "rudder-sdk-java",
24+
"changelog-path": "CHANGELOG.md",
25+
"extra-files": [
26+
"pom.xml"
27+
]
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)