Skip to content

Release beta version #3

Release beta version

Release beta version #3

Workflow file for this run

# Build and publish -beta tag for @gravity-ui/app-builder
# 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:
name: Release from ${{ github.ref_name }}
runs-on: ubuntu-latest
steps:
- name: Check version
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
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Install Packages
run: npm ci
- name: Unit tests
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 }}