Production Release #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Production Release | |
on: | |
workflow_dispatch: | |
inputs: | |
force: | |
description: Force publish all packages? | |
type: boolean | |
default: false | |
graduate: | |
description: Graduate prerelease packages? | |
type: boolean | |
default: false | |
jobs: | |
publish: | |
name: Publish v6 | |
environment: | |
name: production | |
url: https://ui.refinitiv.com | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
# Number of commits to fetch. 0 indicates all history for all branches and tags. | |
# Pulls all commits (needed for Lerna) | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Configure Git User | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "refinitiv-ui-dev" | |
- name: Gather resources and build | |
uses: ./.github/actions/checkout-install-and-build | |
- name: Setup command line option | |
shell: bash | |
run: | | |
[[ "${{ inputs.force }}" == "true" ]] && export FORCE=--force-publish || export FORCE='' | |
[[ "${{ inputs.graduate }}" == "true" ]] && export GRADUATE=--conventional-graduate || export GRADUATE='' | |
echo "FORCE_OPTION=$FORCE" >> $GITHUB_ENV | |
echo "GRADUATE_OPTION=$GRADUATE" >> $GITHUB_ENV | |
- name: Bump package versions and create GitHub release | |
run: npx lerna version --create-release github --conventional-commits ${{ env.FORCE_OPTION }} ${{ env.GRADUATE_OPTION }} --yes | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Publish to NPM | |
run: npx lerna publish from-git --dist-tag v6-lts --yes | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Docs | |
run: curl -X POST "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/${{ secrets.CF_DEPLOY_HOOKS_ID }}" |