TypeScript SDK Release #9
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: TypeScript SDK Release | |
on: | |
workflow_call: | |
secrets: | |
NPM_TOKEN: | |
description: 'NPM token' | |
required: true | |
workflow_dispatch: | |
jobs: | |
publish: | |
permissions: | |
contents: read | |
id-token: write | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install pre-requisites | |
uses: ./.github/actions/setup | |
- name: Publish to npm | |
continue-on-error: true # this can fail if the version is already published | |
working-directory: sdk/typescript | |
shell: bash | |
run: | | |
set -e | |
../../gradlew build | |
npm publish --provenance --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |