Fix esm (#522) #6
Workflow file for this run
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: | |
tags: | |
- 'v*' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: 'yarn' | |
registry-url: https://registry.npmjs.org/ | |
- run: yarn --immutable | |
- run: yarn build | |
# version containing a hyphen, publish as beta, i.e: 1.0.0-1 | |
- run: | | |
if npm pkg get version --workspace @acala-network/sdk-core | jq '."@acala-network/sdk-core "' | grep '-'; then TAG='--tag beta'; fi | |
echo "NPM_TAG=$TAG" >> $GITHUB_ENV | |
# Writes token to .yarnrc.yml. If written directly in .yarnrc.yml, it will cause an error | |
- run: | | |
echo npmAuthToken: "\${NPM_AUTH_TOKEN}" >> ./.yarnrc.yml | |
- name: Publish @acala-network/sdk-core | |
run: yarn workspace @acala-network/sdk-core npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish @acala-network/sdk | |
run: yarn workspace @acala-network/sdk npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish @acala-network/sdk-homa | |
run: yarn workspace @acala-network/sdk-homa npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish @acala-network/sdk-loan | |
run: yarn workspace @acala-network/sdk-loan npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish @acala-network/sdk-payment | |
run: yarn workspace @acala-network/sdk-payment npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish @acala-network/sdk-swap | |
run: yarn workspace @acala-network/sdk-swap npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish @acala-network/wormhole-protal | |
run: yarn workspace @acala-network/wormhole-protal npm publish --tolerate-republish --access public ${{ env.NPM_TAG }} | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: | | |
git checkout ./.yarnrc.yml |