added tests for account32 (#37) #24
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: Publish | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: setup node env | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: setup Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: install dependencies | |
run: yarn install --immutable | |
- name: build package | |
run: yarn build:dist | |
- name: publish package if version changed | |
run: | | |
PACKAGE_VERSION=$(cat package.json | jq -r .version) | |
NPM_VERSION=$(npm show @acala-network/asset-router version) | |
if [ "$PACKAGE_VERSION" != "$NPM_VERSION" ]; then | |
npm publish --access public | |
else | |
echo "Version $PACKAGE_VERSION is already published." | |
fi | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |