⚠️ Release #15
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: ⚠️ Release @ng-web-apis | |
on: | |
workflow_dispatch: | |
inputs: | |
forcePush: | |
type: boolean | |
required: false | |
description: --force-publish all package | |
mode: | |
type: choice | |
description: force all packages to be versioned (depend --force-publish) | |
required: false | |
default: minor | |
options: | |
- patch | |
- minor | |
- major | |
jobs: | |
run-release: | |
name: Run release | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} | |
steps: | |
- name: Fetch from origin repo | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} | |
- name: Setup Node.js and Cache | |
uses: ./.github/actions/nodejs | |
- name: Setup GIT username and NPM token | |
run: | | |
git config --global user.name "taiga-family-bot" | |
git config --global user.email "[email protected]" | |
git config remote.origin.url https://x-access-token:${{ secrets.TAIGA_FAMILY_BOT_PAT }}@github.com/$GITHUB_REPOSITORY | |
npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | |
NPM_WHOAMI_OUTPUT=$(npm whoami) | |
echo "::debug::npm whoami: ${NPM_WHOAMI_OUTPUT}" | |
- name: Lerna update version of packages | |
if: always() | |
run: | | |
if [[ ${{ github.event.inputs.forcePush }} == "true" ]]; then | |
npx lerna version ${{ github.event.inputs.mode }} --no-private --force-publish | |
else | |
npx lerna version --no-private | |
fi | |
- name: Build libraries | |
run: npx nx run-many --target=build --parallel=1 --output-style=stream --exclude=demo | |
- name: Publish | |
if: always() | |
run: npx nx run-many --target=publish --parallel=1 --output-style=stream | |
concurrency: | |
group: release-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true |