From 0c41f4bfd011fabe8ac49358fd1259ae6a3b0c88 Mon Sep 17 00:00:00 2001 From: NasgulNexus Date: Thu, 30 Jan 2025 12:21:26 +0100 Subject: [PATCH 1/2] chore: add actions github release beta --- .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..21eb08bb --- /dev/null +++ b/.github/workflows/release-beta.yml @@ -0,0 +1,52 @@ +# Build and publish -beta tag for @gravity-ui/date-components +# 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 From f92ed84ea6a680e4ca3f510aa257db5e6f8310d5 Mon Sep 17 00:00:00 2001 From: NasgulNexus Date: Thu, 30 Jan 2025 12:30:05 +0100 Subject: [PATCH 2/2] fix: fix commit --- .github/workflows/release-beta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml index 21eb08bb..dad52a66 100644 --- a/.github/workflows/release-beta.yml +++ b/.github/workflows/release-beta.yml @@ -1,4 +1,4 @@ -# Build and publish -beta tag for @gravity-ui/date-components +# Build and publish -beta tag for @gravity-ui/dynamic-forms # Runs manually in Actions tabs in github # Runs on any branch except main