Skip to content

update

update #4

Workflow file for this run

name: Publish
on:
push:
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- '@acala-network/type-definitions'
- '@acala-network/types'
- '@acala-network/api-derive'
- '@acala-network/api'
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: git config email
run: git config --local user.email [email protected]
- name: git config name
run: git config --local user.name Bodhibot
- name: setup node env
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: install dependencies
run: yarn install --immutable
- name: build packages
run: yarn build
# 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 ${{ matrix.package }}
run: |
# version containing a hyphen, publish as beta, i.e: 1.0.0-1
if npm pkg get version --workspace ${{ matrix.package }} | jq '."${{ matrix.package }}"' | grep '-'; then TAG='--tag beta'; fi
yarn workspace ${{ matrix.package }} npm publish --tolerate-republish --access public $TAG
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- run: |
git checkout ./.yarnrc.yml