Merge pull request #390 from Tonomy-Foundation/feature/113-linkauth-d… #315
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: 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: 📦 Install | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.12.1 | |
registry-url: https://registry.npmjs.org/ | |
- name: 🚀 Build and publish SDK | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.12.1 | |
- 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 release | |
env: | |
GITHUB_TOKEN: ${{secrets.MY_GITHUB_PERSONAL_ACCESS_TOKEN}} | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |