diff --git a/.github/workflows/publish-alpha.yml b/.github/workflows/publish-alpha.yml index 8a7cdc3c984..4c7d869559e 100644 --- a/.github/workflows/publish-alpha.yml +++ b/.github/workflows/publish-alpha.yml @@ -4,22 +4,11 @@ name: Release ~ Publish alpha on: workflow_dispatch: jobs: - bump-version: - uses: ./.github/workflows/rw-bump-version.yml + publish-pre-release: + uses: ./.github/workflows/rw-publish-prerelase.yml permissions: contents: write + id-token: write secrets: inherit with: source-branch: "master" - bump: "prerelease" - prerelease-id: "alpha" - - publish-alpha: - needs: [bump-version] - uses: ./.github/workflows/rw-publish-version.yml - permissions: - contents: write - secrets: inherit - with: - source-branch: "master" - release-tag: "prerelease" diff --git a/.github/workflows/pull-request-prerelease.yml b/.github/workflows/pull-request-prerelease.yml new file mode 100644 index 00000000000..52181628f22 --- /dev/null +++ b/.github/workflows/pull-request-prerelease.yml @@ -0,0 +1,17 @@ +name: Pull request ~ Prerelease +on: + pull_request: + types: [closed] + branches: + - master + - release + +jobs: + publish-pre-release: + name: Publish pre-release + if: > + github.event.pull_request.merged == true && + any(github.event.pull_request.labels.*.name, '==', 'publish pre-release') + uses: ./.github/workflows/rw-publish-prerelase.yml + with: + source-branch: ${{ github.event.pull_request.base.ref }} diff --git a/.github/workflows/rw-bump-version.yml b/.github/workflows/rw-bump-version.yml index 0a7ea73648a..6b4a6e92fbe 100644 --- a/.github/workflows/rw-bump-version.yml +++ b/.github/workflows/rw-bump-version.yml @@ -40,7 +40,7 @@ jobs: - name: Add repository to git safe directories to avoid dubious ownership issue run: git config --global --add safe.directory $GITHUB_WORKSPACE - - name: Create and push branch + - name: Bum rush version and commit to source branch env: BUMP: ${{ inputs.bump }} PRERELEASE_ID: ${{ inputs.prerelease-id }} @@ -51,7 +51,8 @@ jobs: # it needs git configured already user.email/name rush version --bump --override-bump $BUMP --override-prerelease-id $PRERELEASE_ID git add -A - git commit -m "Bump versions" + VERSION=$(node -p "require('./libs/sdk-ui/package.json').version") + git commit -m "Bump versions to $VERSION" git push origin ${{ inputs.source-branch }} - name: Get version id: version diff --git a/.github/workflows/rw-publish-prerelase.yml b/.github/workflows/rw-publish-prerelase.yml new file mode 100644 index 00000000000..cd379e21ded --- /dev/null +++ b/.github/workflows/rw-publish-prerelase.yml @@ -0,0 +1,74 @@ +# (C) 2024 GoodData Corporation + +name: rw ~ Release ~ Publish prerelease +on: + workflow_call: + inputs: + source-branch: + required: true + description: "The name of the source branch" + type: string + +# limit concurrency to one run per branch at a time +# so that we can run this from master and a release branch at the same time +# When a concurrent job or workflow is queued, +# if another job or workflow using the same concurrency group in the repository is in progress, +# the queued job or workflow will be pending. Any previously pending job or workflow in the concurrency group will be canceled. +concurrency: + group: prerelease-${{ github.event.inputs.source-branch }} + cancel-in-progress: false + +jobs: + setup-params: + runs-on: [infra-small] + outputs: + prerelease-id: ${{ steps.validate-params.outputs.prerelease-id }} + + steps: + - name: validate params + id: validate-params + run: | + if [ "${{ inputs.source-branch }}" = "master" ]; then + echo "prerelease-id=alpha" >> $GITHUB_OUTPUT + elif [ "${{ inputs.source-branch }}" = "release" ]; then + echo "prerelease-id=beta" >> $GITHUB_OUTPUT + else + echo "Invalid branch provided. Please provide either 'master' or 'release'." + exit 1 + fi + + bump-version: + needs: [setup-params] + uses: ./.github/workflows/rw-bump-version.yml + permissions: + contents: write + id-token: write + secrets: inherit + with: + source-branch: ${{ github.event.inputs.source-branch }} + bump: "prerelease" + prerelease-id: ${{ needs.setup-params.outputs.prerelease-id }} + + publish-prerelease: + needs: [bump-version] + uses: ./.github/workflows/rw-publish-version.yml + permissions: + contents: read + id-token: write + secrets: inherit + with: + source-branch: ${{ github.event.inputs.source-branch }} + release-tag: "prerelease" + + slack-notification: + runs-on: [infra1-small] + needs: [bump-version, publish-prerelease] + steps: + - name: Notify to slack + uses: slackapi/slack-github-action@v1.23.0 + with: + channel-id: "#javascript-notifications" + slack-message: "SDK-UI versions *${{ env.RELEASE_VERSION }}* has been successfully published to NPM." + env: + RELEASE_VERSION: ${{ needs.bump-version.outputs.version }} + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/rw-publish-version.yml b/.github/workflows/rw-publish-version.yml index 136d3e15ccd..6d66fd14d33 100644 --- a/.github/workflows/rw-publish-version.yml +++ b/.github/workflows/rw-publish-version.yml @@ -18,20 +18,25 @@ jobs: runs-on: [infra1-medium] container: image: 020413372491.dkr.ecr.us-east-1.amazonaws.com/3rdparty/library/node:18.17.0-bullseye + permissions: + contents: read + id-token: write steps: - name: Checkout code uses: actions/checkout@v4 with: ref: ${{ inputs.source-branch }} + - name: Add repository to git safe directories to avoid dubious ownership issue + run: git config --global --add safe.directory $GITHUB_WORKSPACE - name: Get NPM_PUBLISH_TOKEN from Vault and set it as env variable uses: hashicorp/vault-action@v2 with: url: "https://vault.ord1.infra.intgdc.com" method: jwt path: jwt/github - role: ecr-push + role: front-end secrets: | - secret/v3/int/npm/rw-token secret | NPM_PUBLISH_TOKEN + secret/data/v3/int/npm/rw-token secret | NPM_PUBLISH_TOKEN ; - name: Install rush run: | npm install -g @microsoft/rush diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index 0f70ac29a8b..af2908e4336 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -12,14 +12,14 @@ { "definitionName": "lockStepVersion", "policyName": "sdk", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "nextBump": "prerelease", "mainProject": "@gooddata/sdk-ui-all" }, { "definitionName": "lockStepVersion", "policyName": "sdk-examples", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "nextBump": "prerelease", "mainProject": "@gooddata/sdk-interactive-examples" } diff --git a/examples/sdk-interactive-examples/examples-template/package.json b/examples/sdk-interactive-examples/examples-template/package.json index fbbd25b1b4c..1d5648cc555 100644 --- a/examples/sdk-interactive-examples/examples-template/package.json +++ b/examples/sdk-interactive-examples/examples-template/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-examples-template", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "GoodData interactive example template", "description": "GoodData interactive example template", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-attributefilter/package.json b/examples/sdk-interactive-examples/examples/example-attributefilter/package.json index 4af8566b975..8913ac05f72 100644 --- a/examples/sdk-interactive-examples/examples/example-attributefilter/package.json +++ b/examples/sdk-interactive-examples/examples/example-attributefilter/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-attributefilter", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Attribute Filter Example", "description": "This example demonstrates how to use the AttributeFilter component to filter data in a visualization.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-chartconfig/package.json b/examples/sdk-interactive-examples/examples/example-chartconfig/package.json index 5e162f3cf3b..545956882d7 100644 --- a/examples/sdk-interactive-examples/examples/example-chartconfig/package.json +++ b/examples/sdk-interactive-examples/examples/example-chartconfig/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-chartconfig", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Chart config manipulation", "description": "This interactive example demonstrates how to manipulate the chart config.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-columnchart/package.json b/examples/sdk-interactive-examples/examples/example-columnchart/package.json index 528c4cb314b..cacee505bfd 100644 --- a/examples/sdk-interactive-examples/examples/example-columnchart/package.json +++ b/examples/sdk-interactive-examples/examples/example-columnchart/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-columnchart", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "ColumnChart", "description": "This example demonstrates the usage of the ColumnChart component with the viewBy and stackBy properties.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-combochart/package.json b/examples/sdk-interactive-examples/examples/example-combochart/package.json index c8f8a535ce1..ae86cc5904e 100644 --- a/examples/sdk-interactive-examples/examples/example-combochart/package.json +++ b/examples/sdk-interactive-examples/examples/example-combochart/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-combochart", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "ComboChart", "description": "Example demonstrates ComboChart secondaryMeasures definition. ", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-dashboard/package.json b/examples/sdk-interactive-examples/examples/example-dashboard/package.json index 9778b9e38b2..bec38bd9540 100644 --- a/examples/sdk-interactive-examples/examples/example-dashboard/package.json +++ b/examples/sdk-interactive-examples/examples/example-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-dashboard", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Dashboard component", "description": "This example shows how to use the Dashboard component.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-datefilter/package.json b/examples/sdk-interactive-examples/examples/example-datefilter/package.json index b20cfc6a820..00e4ad61672 100644 --- a/examples/sdk-interactive-examples/examples/example-datefilter/package.json +++ b/examples/sdk-interactive-examples/examples/example-datefilter/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-datefilter", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "DateFilter", "description": "Example demonstrates usage of Date Filter component.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-dependentfilters/package.json b/examples/sdk-interactive-examples/examples/example-dependentfilters/package.json index ff012a3da44..2cfecac2160 100644 --- a/examples/sdk-interactive-examples/examples/example-dependentfilters/package.json +++ b/examples/sdk-interactive-examples/examples/example-dependentfilters/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-dependentfilters", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Dependent Filters Example", "description": "This example demonstrates how to use multiple attribute filters linked together to filter data in a visualization.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-execute/package.json b/examples/sdk-interactive-examples/examples/example-execute/package.json index b91887fcf33..f7b0cfbd4f3 100644 --- a/examples/sdk-interactive-examples/examples/example-execute/package.json +++ b/examples/sdk-interactive-examples/examples/example-execute/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-execute", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Execute", "description": "This example demonstrates using Execute component and build custom visualization.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-granularity/package.json b/examples/sdk-interactive-examples/examples/example-granularity/package.json index 8c98f0e4840..226978e1965 100644 --- a/examples/sdk-interactive-examples/examples/example-granularity/package.json +++ b/examples/sdk-interactive-examples/examples/example-granularity/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-granularity", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Granularity", "description": "This example exmplains DateFilter granularity ", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-headline/package.json b/examples/sdk-interactive-examples/examples/example-headline/package.json index 3a22a730334..70f27dd9e02 100644 --- a/examples/sdk-interactive-examples/examples/example-headline/package.json +++ b/examples/sdk-interactive-examples/examples/example-headline/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-headline", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "Headline", "description": "This example shows how to use the Headline component.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-pivottable/package.json b/examples/sdk-interactive-examples/examples/example-pivottable/package.json index e042c791c2f..64db002021f 100644 --- a/examples/sdk-interactive-examples/examples/example-pivottable/package.json +++ b/examples/sdk-interactive-examples/examples/example-pivottable/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-pivottable", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "PivotTable", "description": "Basic PivotTable manipulation.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/examples/example-relativedatefilter/package.json b/examples/sdk-interactive-examples/examples/example-relativedatefilter/package.json index 372121121a6..ed037a53493 100644 --- a/examples/sdk-interactive-examples/examples/example-relativedatefilter/package.json +++ b/examples/sdk-interactive-examples/examples/example-relativedatefilter/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-example-relativedatefilter", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "title": "RelativeDateFilter", "description": "Example demonstrates how to set relative DateFilter for visualization.", "author": "GoodData Corporation", diff --git a/examples/sdk-interactive-examples/package.json b/examples/sdk-interactive-examples/package.json index 56ba64e2f23..ea0da8c1e81 100644 --- a/examples/sdk-interactive-examples/package.json +++ b/examples/sdk-interactive-examples/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-interactive-examples", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "description": "GoodData React interactive examples", "license": "LicenseRef-LICENSE", "author": "GoodData Corporation", diff --git a/libs/api-client-bear/package.json b/libs/api-client-bear/package.json index 975b5bc71d3..1787715a57f 100644 --- a/libs/api-client-bear/package.json +++ b/libs/api-client-bear/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/api-client-bear", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "API Client for the GoodData platform", "repository": { diff --git a/libs/api-client-tiger/package.json b/libs/api-client-tiger/package.json index 0e329ee0ed0..8784d9c1e86 100644 --- a/libs/api-client-tiger/package.json +++ b/libs/api-client-tiger/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/api-client-tiger", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "API Client for GoodData Cloud and GoodData.CN", "repository": { diff --git a/libs/api-model-bear/package.json b/libs/api-model-bear/package.json index 2fee538b9e3..bcf4f4c31a5 100644 --- a/libs/api-model-bear/package.json +++ b/libs/api-model-bear/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/api-model-bear", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "description": "TypeScript definition files for GoodData platform", "repository": { "type": "git", diff --git a/libs/sdk-backend-base/package.json b/libs/sdk-backend-base/package.json index 9958cc44e05..c08779ae45f 100644 --- a/libs/sdk-backend-base/package.json +++ b/libs/sdk-backend-base/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-backend-base", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData.UI SDK - Base for backend implementations", "repository": { diff --git a/libs/sdk-backend-bear/package.json b/libs/sdk-backend-bear/package.json index 7c9d627e902..9366d48ed96 100644 --- a/libs/sdk-backend-bear/package.json +++ b/libs/sdk-backend-bear/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-backend-bear", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData Backend SPI implementation for the GoodData platform", "repository": { diff --git a/libs/sdk-backend-mockingbird/package.json b/libs/sdk-backend-mockingbird/package.json index f59a39aace1..35b36843f9e 100644 --- a/libs/sdk-backend-mockingbird/package.json +++ b/libs/sdk-backend-mockingbird/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-backend-mockingbird", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "Mock GoodData Backend SPI implementation", "repository": { diff --git a/libs/sdk-backend-spi/package.json b/libs/sdk-backend-spi/package.json index 0f6af80484c..9fbf90a2f2a 100644 --- a/libs/sdk-backend-spi/package.json +++ b/libs/sdk-backend-spi/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-backend-spi", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData Backend SPI abstraction interfaces", "repository": { diff --git a/libs/sdk-backend-tiger/package.json b/libs/sdk-backend-tiger/package.json index 15e84429744..8ee29e6b658 100644 --- a/libs/sdk-backend-tiger/package.json +++ b/libs/sdk-backend-tiger/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-backend-tiger", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN", "repository": { diff --git a/libs/sdk-embedding/package.json b/libs/sdk-embedding/package.json index 34a8b181e8a..e60b322f50a 100644 --- a/libs/sdk-embedding/package.json +++ b/libs/sdk-embedding/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-embedding", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData Embedding APIs", "repository": { diff --git a/libs/sdk-model/package.json b/libs/sdk-model/package.json index ae46fd997be..65cd3e0316b 100644 --- a/libs/sdk-model/package.json +++ b/libs/sdk-model/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-model", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData Model definitions used by UI components and Backend SPI and its implementations", "repository": { diff --git a/libs/sdk-ui-all/package.json b/libs/sdk-ui-all/package.json index c993cf82c8d..0814eb0b7de 100644 --- a/libs/sdk-ui-all/package.json +++ b/libs/sdk-ui-all/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-ui-all", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "author": "GoodData", "description": "GoodData SDK - All-In-One", "repository": { diff --git a/libs/sdk-ui-charts/package.json b/libs/sdk-ui-charts/package.json index 00ad0cc467f..6d2d18a728e 100644 --- a/libs/sdk-ui-charts/package.json +++ b/libs/sdk-ui-charts/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-ui-charts", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "description": "GoodData.UI SDK - Charts", "repository": { "type": "git", diff --git a/libs/sdk-ui-dashboard/package.json b/libs/sdk-ui-dashboard/package.json index 942c2416ac1..6479aa4b2a2 100644 --- a/libs/sdk-ui-dashboard/package.json +++ b/libs/sdk-ui-dashboard/package.json @@ -1,6 +1,6 @@ { "name": "@gooddata/sdk-ui-dashboard", - "version": "9.7.0-alpha.15", + "version": "9.7.0-alpha.17", "description": "GoodData SDK - Dashboard Component", "repository": { "type": "git", diff --git a/libs/sdk-ui-dashboard/src/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.tsx b/libs/sdk-ui-dashboard/src/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.tsx index a863e4f05b9..7ae53f6e13c 100644 --- a/libs/sdk-ui-dashboard/src/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.tsx +++ b/libs/sdk-ui-dashboard/src/presentation/dragAndDrop/draggableWidget/AddRichTextWidgetButton.tsx @@ -2,17 +2,10 @@ import { Icon } from "@gooddata/sdk-ui-kit"; import React from "react"; import { FormattedMessage } from "react-intl"; -import cx from "classnames"; export const AddRichTextWidgetButton: React.FC = () => { return ( -