Skip to content

Merge pull request #396 from Tonomy-Foundation/feature/336-upgrade-to… #321

Merge pull request #396 from Tonomy-Foundation/feature/336-upgrade-to…

Merge pull request #396 from Tonomy-Foundation/feature/336-upgrade-to… #321

Workflow file for this run

name: Tonomy SDK publish
permissions:
contents: write
on:
push:
branches:
- development
- testnet
- master
jobs:
publish-npm:
runs-on: ubuntu-20.04
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
with:
token: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}
- name: Enable Corepack before setting up Node
run: corepack enable
- name: 📦 Install
uses: actions/setup-node@v4
with:
node-version: 22.3.0
registry-url: https://registry.npmjs.org/
- name: 🚀 Build and publish SDK
uses: actions/setup-node@v4
with:
node-version: 22.3.0
- name: Check branch name
run: echo ${GITHUB_REF#refs/*/}
- run: |
if [[ ${GITHUB_REF#refs/*/} == "development" ]]; then
echo "Variable BRANCH_NAME is set to 'development'"
yarn config set tag development
fi
if [[ ${GITHUB_REF#refs/*/} == "testnet" ]]; then
echo "Variable BRANCH_NAME is set to 'testnet'"
yarn config set tag rc
fi
- run: yarn install --immutable
- run: yarn run build
- run: yarn run release
env:
GITHUB_TOKEN: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}