Skip to content

Rush publish prerelease to NPM #200

Rush publish prerelease to NPM

Rush publish prerelease to NPM #200

name: Rush publish prerelease to NPM
on:
workflow_dispatch:
inputs:
prereleaseName:
required: true
description: Tag to append to version of each package
env:
BROWSERSLIST_IGNORE_OLD_DATA: 1
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
create-release:
# Name the Job
name: Rush publish apply
# Set the type of machine to run on
runs-on: ubuntu-latest
environment: Production
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
token: ${{ secrets.GH_PAT }}
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: PNPM cache via actions/cache@v3
id: pnpm-cache
uses: actions/cache@v3
with:
path: /home/runner/work/design-system/design-system/common/temp/pnpm-store/v3
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: Install dependencies
run: node common/scripts/install-run-rush.js install
- name: Build components
run: node common/scripts/install-run-rush.js build --timeline
- name: Git set author name
run: git config --global user.name "Priceline DS Publish Bot"
- name: Git set author email
run: git config --global user.email "uxplatformdevs@priceline.com"
- name: rush apply versions
run: node common/scripts/install-run-rush.js publish --apply --add-commit-details --prerelease-name=${{ github.event.inputs.prereleaseName }} --partial-prerelease
- name: publish npm-package
run: node common/scripts/install-run-rush.js publish --publish --include-all --tag="beta" --npm-auth-token="${{ secrets.NPM_AUTOMATION_TOKEN }}"