Skip to content
Snippets Groups Projects
Unverified Commit 86c59e28 authored by github-automation-metabase's avatar github-automation-metabase Committed by GitHub
Browse files

Automate npm dist-tags (#48982) (#49079)


* Remove outdated comment

* Add logic for automating npm dist tags

* Fix deprecated GitHub action output command

* Update .github/workflows/release-embedding-sdk.yml



* Add comment and correct 51 dist tag

---------

Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
parent 2c61d339
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@ name: Release Metabase Embedding SDK for React
on:
workflow_dispatch:
inputs:
# TODO: Add a version validation, so the workflow won't fail when publishing to npm
branch:
description: "Branch we want to release the SDK from"
type: choice
......@@ -51,7 +50,7 @@ jobs:
id: current-sdk-version
run: |
VERSION=$(jq -r .version ./enterprise/frontend/src/embedding-sdk/package.template.json)
echo "::set-output name=sdk_current_version::$VERSION"
echo "sdk_current_version=$VERSION" >> $GITHUB_OUTPUT
- name: Get next SDK patch version
id: new-sdk-version
......@@ -249,7 +248,13 @@ jobs:
run: |
cd sdk
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc
npm publish
# Please keep the value in sync with `inputs.branch`'s release branch
npm publish --tag ${{fromJson('{"master": "canary", "release-x.51.x": "51-stable"}')[inputs.branch]}}
- name: Add `latest` tag to the latest release branch (`release-x.51.x`) deployment
if: ${{ inputs.branch == 'release-x.51.x' }}
run: |
npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest
git-tag:
needs: [publish-npm, determine-version]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment