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
feat: add embedding-sdk-tag-latest workflow for npm dist-tag (#75245)
Mahatthana (Kelvin) Nomsawadi43b804d390cf
diff --git a/.github/workflows/embedding-sdk-tag-latest.yml b/.github/workflows/embedding-sdk-tag-latest.ymlnew file mode 100644index 00000000000..332178dc163--- /dev/null+++ b/.github/workflows/embedding-sdk-tag-latest.yml@@ -0,0 +1,45 @@+name: Tag Embedding SDK npm release as latest++on:+ workflow_dispatch:+ inputs:+ version:+ description: "npm version to tag as latest, e.g. 0.61.5"+ type: string+ required: true+ workflow_call:+ inputs:+ version:+ description: "npm version to tag as latest, e.g. 0.61.5"+ type: string+ required: true++concurrency:+ group: npm-dist-tag-latest+ cancel-in-progress: false++permissions: {}++jobs:+ tag-latest:+ name: Tag npm release as latest+ runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}+ timeout-minutes: 5+ env:+ VERSION: ${{ inputs.version }}+ steps:+ - name: Setup Node.js+ uses: actions/[email protected]+ with:+ node-version: 24+ registry-url: https://registry.npmjs.org++ - name: Verify version exists on npm+ run: npm view "@metabase/embedding-sdk-react@$VERSION" version++ - name: Add `latest` dist-tag to npm release+ run: |+ npm dist-tag add "@metabase/embedding-sdk-react@$VERSION" latest+ echo "Tagged @metabase/embedding-sdk-react@$VERSION as latest" >> "$GITHUB_STEP_SUMMARY"+ env:+ NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}diff --git a/.github/workflows/release-embedding-sdk.yml b/.github/workflows/release-embedding-sdk.ymlindex 9feded02422..ebb2f07bd80 100644--- a/.github/workflows/release-embedding-sdk.yml+++ b/.github/workflows/release-embedding-sdk.yml@@ -94,6 +94,7 @@ jobs:"test","build-sdk","publish-npm",+ "tag-latest","git-tag",]runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}@@ -398,12 +399,17 @@ jobs:TAG="${{ steps.compute-tag.outputs.masterTag }}"echo "Resolved npm tag: $TAG"npm publish --tag "$TAG"- # ⚠️ This step should only be executed on the latest stable (gold) release branch.- # Only uncomment this when the new release branch becomes stable (gold).- # - name: Add `latest` tag to the latest release branch (e.g. `release-x.61.x`) deployment- # working-directory: sdk- # run: |- # npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest++ tag-latest:+ name: Tag npm release as latest+ # ⚠️ This should only run on the most recent release branch (e.g. `release-x.61.x`),+ # and only once it becomes stable (gold). Delete this line when gold — do not delete during the pre-gold window.+ if: false+ needs: [publish-npm, determine-sdk-version]+ uses: ./.github/workflows/embedding-sdk-tag-latest.yml+ with:+ version: ${{ needs.determine-sdk-version.outputs.sdk_version }}+ secrets: inheritgit-tag:needs: [publish-npm, determine-sdk-version]