Skip to content

πŸ™Œ OpenHands: AI-Driven Development

ci: adopt release-please for app and cloud releases (#14718)

Joe Lavertye092b0b2b1e8
diff --git a/.github/release.yml b/.github/release.yml
new file mode 100644
index 0000000000..9d267f3a43
--- /dev/null
+++ b/.github/release.yml
@@ -0,0 +1,14 @@
+changelog:
+ categories:
+ - title: Features
+ labels: ["type: feat"]
+ - title: Bug Fixes
+ labels: ["type: fix"]
+ - title: Performance
+ labels: ["type: perf"]
+ - title: Documentation
+ labels: ["type: docs"]
+ - title: Maintenance
+ labels: ["type: chore", "type: build", "type: ci", "type: refactor", "type: style", "type: test", "type: revert"]
+ - title: Other Changes
+ labels: ["*"]
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000000..b488a69914
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,14 @@
+name: pr
+
+# Lints PR titles (conventional commits) and applies a `type:` label.
+# Runs on pull_request_target to cover forks β€” keep it fork-safe: no checkout of
+# PR code and no `secrets: inherit` here (see release-actions/pr-title.yml).
+on:
+ pull_request_target:
+ types: [opened, edited, reopened, synchronize]
+
+jobs:
+ pr-title:
+ permissions:
+ pull-requests: write
+ uses: OpenHands/release-actions/.github/workflows/pr-title.yml@main
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000000..6ee81c635e
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,31 @@
+name: release
+
+# app (X.Y.Z, excludes enterprise/) and cloud (cloud-X.Y.Z) release lines.
+#
+# BOOTSTRAP: both configs set a top-level `last-release-sha` to bound the first
+# release's notes (the existing tags aren't reachable from main). Delete those
+# lines once each line's first release PR has merged β€” they cap every run, not
+# just the first.
+on:
+ push:
+ branches:
+ - main
+ - 'release/**'
+
+jobs:
+ openhands-app:
+ permissions:
+ contents: write
+ pull-requests: write
+ secrets: inherit
+ uses: OpenHands/release-actions/.github/workflows/release-please.yml@main
+
+ cloud:
+ permissions:
+ contents: write
+ pull-requests: write
+ secrets: inherit
+ uses: OpenHands/release-actions/.github/workflows/release-please.yml@main
+ with:
+ config-file: release-please-config.cloud.json
+ manifest-file: .release-please-manifest.cloud.json
diff --git a/.release-please-manifest.cloud.json b/.release-please-manifest.cloud.json
new file mode 100644
index 0000000000..00a5aedfd2
--- /dev/null
+++ b/.release-please-manifest.cloud.json
@@ -0,0 +1,3 @@
+{
+ ".": "1.38.0"
+}
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
new file mode 100644
index 0000000000..099626f4fc
--- /dev/null
+++ b/.release-please-manifest.json
@@ -0,0 +1,3 @@
+{
+ ".": "1.8.0"
+}
diff --git a/release-please-config.cloud.json b/release-please-config.cloud.json
new file mode 100644
index 0000000000..8a30afde07
--- /dev/null
+++ b/release-please-config.cloud.json
@@ -0,0 +1,16 @@
+{
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
+ "last-release-sha": "2a3f06a75d4b166bef77a0240143efdcc092cfc2",
+ "packages": {
+ ".": {
+ "release-type": "simple",
+ "changelog-type": "github",
+ "skip-changelog": true,
+ "component": "cloud",
+ "include-component-in-tag": true,
+ "include-v-in-tag": false,
+ "include-v-in-release-name": false,
+ "tag-separator": "-"
+ }
+ }
+}
diff --git a/release-please-config.json b/release-please-config.json
new file mode 100644
index 0000000000..a7ff2eeb8b
--- /dev/null
+++ b/release-please-config.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
+ "last-release-sha": "94c60d78545895e198bb1df9d9463c96e2e2b7b2",
+ "packages": {
+ ".": {
+ "release-type": "simple",
+ "changelog-type": "github",
+ "skip-changelog": true,
+ "include-component-in-tag": false,
+ "include-v-in-tag": false,
+ "include-v-in-release-name": false,
+ "exclude-paths": ["enterprise"],
+ "extra-files": [
+ { "type": "toml", "path": "pyproject.toml", "jsonpath": "$.tool.poetry.version" },
+ { "type": "json", "path": "frontend/package.json", "jsonpath": "$.version" },
+ { "type": "json", "path": "frontend/package-lock.json", "jsonpath": "$.version" },
+ { "type": "json", "path": "frontend/package-lock.json", "jsonpath": "$.packages[''].version" }
+ ]
+ }
+ }
+}