Publish Typescript API #37
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: Publish Typescript API | |
on: | |
workflow_dispatch: | |
inputs: | |
TargetSHA: | |
description: full sha of commit to publish ApiAugment from | |
required: true | |
DryRun: | |
description: Dry run mode | |
required: false | |
default: "false" | |
jobs: | |
publish-typescript-api: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.TargetSHA }} | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.10.0 | |
cache: pnpm | |
registry-url: https://registry.npmjs.org/ | |
- name: Build Typescript Augment API package | |
run: | | |
cd typescript-api | |
pnpm i --frozen-lockfile | |
pnpm build | |
- name: Publish typescript API | |
run: | | |
cd typescript-api | |
if [ "${{ github.event.inputs.DryRun }}" == "true" ]; then | |
pnpm publish --access public --no-git-checks --dry-run | |
else | |
pnpm publish --access public --no-git-checks | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |