Skip to content

Publish TypeScript Core API SDK #17

Publish TypeScript Core API SDK

Publish TypeScript Core API SDK #17

name: Publish TypeScript Core API SDK
on:
workflow_dispatch:
inputs:
package_version_number:
description: "Package version number"
required: true
# For now, let's just deploy it manually, to avoid issues with needing to keep its version numbers
# in-sync with the node, which doesn't really make sense
# release:
# types: [published]
jobs:
publish-core-sdk-npmjs:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
defaults:
run:
working-directory: ./sdk/typescript
steps:
- uses: RDXWorks-actions/checkout@main
- uses: ./.github/actions/fetch-secrets
with:
role_name: "${{ secrets.BABYLON_SECRETS_ROLE_ARN }}"
app_name: "babylon-node"
step_name: "publish-core-sdk-npmjs"
secret_prefix: "NODE_AUTH"
secret_name: "github-actions/radixdlt/babylon-node/npm-publishing-secret"
parse_json: true
- name: Use Node.js
uses: RDXWorks-actions/setup-node@main
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- name: Build @radixdlt/babylon-core-api-sdk
run: |
yarn
yarn build
- name: Update package.json version
uses: RDXWorks-actions/action-set-json-field@master
with:
file: ./sdk/typescript/package.json
field: version
value: ${{ github.event.inputs.package_version_number || github.event.release.tag_name }}
- run: |
npm config set access public
npm publish