The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
chore: tidy the SDK release dispatch forms and bump output (#78999)
Mahatthana (Kelvin) Nomsawadi2c8d1ad69429
diff --git a/.github/workflows/release-embedding-sdk.yml b/.github/workflows/release-embedding-sdk.ymlindex fc23c172569..1850711c497 100644--- a/.github/workflows/release-embedding-sdk.yml+++ b/.github/workflows/release-embedding-sdk.yml@@ -17,14 +17,11 @@ on:workflow_dispatch:inputs:read_first:- description: |- ⚠️ To cut a release, use the "SDK Version Bump PR" workflow instead — it bumps the version and opens a PR; merging that PR publishes.- This publishes the version already committed in package.template.json. It never bumps. Pick the branch in "Use workflow from" above.- Use it only when neither the bump PR nor re-running the failed jobs will do.+ description: "⚠️ Manual override. Publishes whatever version is already committed in package.template.json; it never bumps. Normally you want the SDK Version Bump PR workflow, where merging the PR publishes."type: choicerequired: falseoptions:- - Publish the committed version from the branch picked in "Use workflow from" above+ - Publishes the branch picked above# Step 2 of the new release process: merging a version-bump PR (opened by# sdk-version-bump-pr.yml, labeled `sdk-release-trigger`) triggers a release# of whatever branch that PR targeted. See `prepare-release` below.diff --git a/.github/workflows/sdk-version-bump-pr.yml b/.github/workflows/sdk-version-bump-pr.ymlindex a91f30ac756..3c54340f509 100644--- a/.github/workflows/sdk-version-bump-pr.yml+++ b/.github/workflows/sdk-version-bump-pr.yml@@ -3,6 +3,19 @@# package.template.json, then open a PR labeled `sdk-release-trigger`.# Merging that PR is what actually triggers a release, via the# `pull_request` trigger on release-embedding-sdk.yml.+#+# Release types (the dispatch form lists them in release-cycle order):+# beta - release branch, before gold: publish a beta.+# patch - release branch: graduate the beta to 0.N.0 at gold,+# then ship 0.N.1, 0.N.2 and so on after gold.+# preminor - master, at gold: move master to the next major.+# alpha - master, any time: bump the development version.+# custom - one-off branch (esbuild, data-apps): publish under its+# own prerelease id, which is reused on later bumps.+#+# The dispatch form's descriptions render as the input's label, which is a+# single plain text node - newlines collapse to spaces and no markdown is+# parsed. Keep them short and single-line; put detail here instead.name: SDK Version Bump PRrun-name: Bump Embedding SDK version (${{ inputs.release_type }}) on ${{ github.ref_name }}@@ -14,32 +27,26 @@ on:type: choicerequired: falseoptions:- - Pick the branch in "Use workflow from" above+ - Bumps the branch picked aboverelease_type:- description: |- Before gold:- • beta — release branch: publish a beta-- At gold:- • patch — release branch: graduate the beta to 0.N.0- • preminor — master: move master to the next major-- After gold:- • patch — release branch: ship a patch (0.N.1, 0.N.2, ...)-- Any time:- • alpha — master: bump the development version- • custom — one-off branch (esbuild, data-apps): publish under its own prerelease id+ # Option names are capitalised for emphasis only - the values stay+ # lowercase. The label renders as plain text, so caps is the only+ # emphasis available (same reason prerelease_id below shouts FIRST).+ description: "BETA - before gold, on a release branch. PATCH - at gold and after, on a release branch. PREMINOR - at gold, on master. ALPHA - any time, on master. CUSTOM - any time, on a one-off branch."type: choicerequired: true+ # Pinned so the release-cycle ordering below does not decide the+ # preselection: without a default, GitHub preselects the first option.+ default: alphaoptions:- - alpha- beta+ - patch # one entry, two phases: the version decides 0.N.0 vs 0.N.1- preminor- - patch+ - alpha- customprerelease_id:- description: "release_type=custom only, and only on the FIRST cut of a one-off branch (e.g. data-apps). Becomes the prerelease id in the version (0.62.5-data-apps.0) and the npm dist-tag (62-data-apps). Leave empty on later bumps - the id is reused from the current version."+ # Left empty on later bumps, the id is reused from the current version.+ description: "For release_type=custom only, and only on the FIRST cut of a one-off branch. Enter a name like data-apps: the version becomes 0.62.5-data-apps.0 and the dist-tag 62-data-apps. Leave empty on later bumps."type: stringrequired: false@@ -155,7 +162,10 @@ jobs:# --reviewer tags the team so a release is visible, not because anything# waits on a review. It needs the automation PAT: GITHUB_TOKEN cannot# resolve an org team.- gh pr create --base "$BRANCH" \+ #+ # gh prints the new PR's URL on stdout; capture it so the job summary+ # can link the PR that this run opened.+ pr_url=$(gh pr create --base "$BRANCH" \--assignee "${GITHUB_ACTOR}" \--reviewer metabase/embedding \--label sdk-release-trigger \@@ -163,7 +173,7 @@ jobs:--body "$(cat <<'BODY'Bumps the Embedding SDK version in `package.template.json` and updates its `sdkRelease` metadata.- | | |+ | Setting | Value ||---|---|| Branch | `${{ github.ref_name }}` || Release type | `${{ inputs.release_type }}` |@@ -177,4 +187,14 @@ jobs:_Opened by the [SDK Version Bump PR workflow](../actions/workflows/sdk-version-bump-pr.yml), triggered by @${{ github.event.sender.login }}._BODY- )"+ )")++ echo "pr_url=$pr_url" >> "$GITHUB_OUTPUT"++ # Separate from "Append workflow summary" above: that step runs before the+ # PR exists, so the link has to be appended after this one opens it.+ - name: Append the PR link to the workflow summary+ env:+ PR_URL: ${{ steps.open-pr.outputs.pr_url }}+ run: |+ printf '\n**Version-bump PR:** %s\n' "$PR_URL" >> "$GITHUB_STEP_SUMMARY"