From 98fc3999d779f95390d3483577c013fcf58cd16e Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 13 Nov 2023 14:47:19 +0300 Subject: [PATCH 1/3] chore: add release-beta workflow --- .github/workflows/release-beta.yml | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 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 0000000..5d2effc --- /dev/null +++ b/.github/workflows/release-beta.yml @@ -0,0 +1,48 @@ +# Build and publish -beta tag for @gravity-ui/chartkit +# 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. 3.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@v2 + - uses: actions/setup-node@v1 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + - run: npm ci + shell: bash + - run: npm test + shell: bash + - name: Bump and commit 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 de721124a81e9f01b5bbc04d5b763f9792523643 Mon Sep 17 00:00:00 2001 From: "Mr.Dr.Professor Patrick" Date: Mon, 13 Nov 2023 12:57:13 +0100 Subject: [PATCH 2/3] Update .github/workflows/release-beta.yml Co-authored-by: Valerii Sidorenko --- .github/workflows/release-beta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-beta.yml b/.github/workflows/release-beta.yml index 5d2effc..2019e75 100644 --- a/.github/workflows/release-beta.yml +++ b/.github/workflows/release-beta.yml @@ -23,8 +23,8 @@ jobs: exit 1 fi fi - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: 18 registry-url: 'https://registry.npmjs.org' From c7e32e4d8ac2f067e7737131ce14be36578bcc9e Mon Sep 17 00:00:00 2001 From: Evgeny Alaev Date: Mon, 13 Nov 2023 15:01:43 +0300 Subject: [PATCH 3/3] fix: review fixes --- .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 2019e75..66dc884 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/chartkit +# Build and publish -beta tag for @gravity-ui/date-utils # Runs manually in Actions tabs in github # Runs on any branch except main