Skip to content

Manual Beta Release Package Test #1

Manual Beta Release Package Test

Manual Beta Release Package Test #1

Workflow file for this run

name: Manual Beta Release Package Test
on:
pull_request:
workflow_dispatch:
inputs:
package:
description: 'Specify package (i.e. "gl-publish-workflow-test-math")'
type: string
required: true
version:
description: "Beta Version (i.e. 4.0.0-beta.0)"
type: string
required: true
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
PACKAGE_TO_PUBLISH: ${{ inputs.package }}
PACKAGE_BETA_VERSION: ${{ inputs.version }}
jobs:
beta-release:
name: Beta Release
runs-on: ubuntu-latest
steps:
- run: |
[[ "${{ env.PACKAGE_TO_PUBLISH }}" ]] || { echo "package input is empty" ; exit 1; }
beta_package_version_regex='^[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$'
if ! [[ ${{ env.PACKAGE_BETA_VERSION }} =~ $beta_package_version_regex ]]; then
echo "Invalid version format"
exit 1
fi
shell: bash
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "yarn"
- run: yarn install
- run: yarn build-ci
- name: Update package.json version to beta version specified
run: |
yarn workspaces ${{ env.PACKAGE_TO_PUBLISH }} exec 'jq ".version = \"${{ env.PACKAGE_BETA_VERSION }}\"" package.json > package.tmp.json && mv package.tmp.json package.json'
shell: bash
- name: Build and publish beta package
run: yarn workspaces ${{ env.PACKAGE_TO_PUBLISH }} exec cat package.json