Skip to content

v1.0.17

v1.0.17 #35

# This is a basic workflow to help you get started with Actions
name: publish_package
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
publish_package:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [">=16.0.0"]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.10.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Configure CI Git User
run: |
git config --global user.name '@phutxorai'
git config --global user.email 'phu.tx@orai.io'
git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_PAT@github.com/oraichain/oraidex-sdk
env:
GITHUB_PAT: ${{ secrets.GIT_PAT }}
- name: Install Yarn
run: npm install -g yarn
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: "**/node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Authenticate with Registry
run: |
yarn logout
echo "registry=http://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish package
run: lerna publish from-package --yes
env:
GH_TOKEN: ${{ secrets.GIT_PAT }}
GITHUB_TOKEN: ${{ secrets.GIT_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}