Publish #107
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: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
common: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./ | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
cache-dependency-path: ./package-lock.json | |
- run: npx lerna@6 bootstrap | |
- run: npx lerna@6 run build | |
- name: Create release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo " - Split main [sdk-nestjs](https://www.npmjs.com/package/@multiversx/sdk-nestjs) package into multiple packages" >> notes.txt | |
echo "" >> notes.txt | |
RELEASE_TAG=v$(node -p "require('./lerna.json').version") | |
gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG" --generate-notes --notes-file=notes.txt | |
- name: Publish to npmjs | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
run: npx lerna@6 publish from-package --yes |