Publish SDK to NPM #6
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 SDK to NPM | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "projects/sdk/package.json" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Cache Node Modules | |
id: node-modules-cache | |
uses: actions/cache@v3 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} | |
- name: Install Dependencies | |
if: steps.node-modules-cache.outputs.cache-hit != 'true' | |
run: yarn install --immutable | |
- name: Build All | |
run: yarn build | |
- name: Publish | |
run: yarn workspace @beanstalk/sdk g:publish | |
env: | |
YARN_NPM_AUTH_TOKEN: ${{ secrets.YARN_NPM_AUTH_TOKEN }} | |
TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }} |