From 824be18ac4882475e6f277372c0f47d63dcc1ffa Mon Sep 17 00:00:00 2001 From: Egor Mostovoy Date: Wed, 29 Jan 2025 11:36:22 +0100 Subject: [PATCH 1/2] fix: hide stotybook actions (#264) --- .storybook/main.ts | 11 ++++++++++- .storybook/preview.ts | 12 +----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.storybook/main.ts b/.storybook/main.ts index a8fb1705..f7963393 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -4,7 +4,16 @@ const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin'); const config: StorybookConfig = { stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], - addons: ['@storybook/addon-essentials', '@storybook/preset-scss', '@storybook/addon-docs'], + addons: [ + { + name: '@storybook/addon-essentials', + options: { + controls: false, + actions: false, + }, + }, + '@storybook/preset-scss', + ], framework: { name: '@storybook/react-webpack5', options: {fastRefresh: true}, diff --git a/.storybook/preview.ts b/.storybook/preview.ts index 8e2cd876..cdde3314 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.ts @@ -2,16 +2,6 @@ import {withTheme, withLang} from './decorators'; export const decorators = [withTheme, withLang]; -export const parameters = { - actions: {argTypesRegex: '^on[A-Z].*'}, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, -}; - export const globalTypes = { theme: { defaultValue: 'light', @@ -37,4 +27,4 @@ export const globalTypes = { ], }, }, -} +}; From b0821e4a238cc26392a3769b6101d739d7bb8a61 Mon Sep 17 00:00:00 2001 From: Egor Mostovoy Date: Thu, 30 Jan 2025 12:48:28 +0100 Subject: [PATCH 2/2] chore: add actions github release beta (#270) --- .github/workflows/release-beta.yml | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release-beta.yml diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml new file mode 100644 index 00000000..dad52a66 --- /dev/null +++ b/.github/workflows/release-beta.yml @@ -0,0 +1,52 @@ +# Build and publish -beta tag for @gravity-ui/dynamic-forms +# Runs manually in Actions tabs in github +# Runs on any branch except main + +name: Release beta version + +on: + workflow_dispatch: + inputs: + version: + type: string + required: false + description: 'If your build failed and the version is already exists you can set version of package manually, e.g. 5.0.0-beta.0. Use the prefix `beta` otherwise you will get error.' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: | + if [ "${{ github.event.inputs.version }}" != "" ]; then + if [[ "${{ github.event.inputs.version }}" != *"beta"* ]]; then + echo "version set incorrectly! Check that is contains beta in it's name" + exit 1 + fi + fi + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + - name: Install Packages + run: npm ci + - name: Lint Files + run: npm run lint + - name: Typecheck + run: npm run typecheck + - name: Test + run: npm test + - name: Bump version + run: | + echo ${{ github.event.inputs.version }} + + if [ "${{ github.event.inputs.version }}" == "" ]; then + npm version prerelease --preid=beta --git-tag-version=false + else + npm version ${{ github.event.inputs.version }} --git-tag-version=false + fi + - name: Publish version + run: npm publish --tag beta --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.GRAVITY_UI_BOT_NPM_TOKEN }} + shell: bash