npm-publish #39
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
# This is a basic workflow that is manually triggered | |
name: npm-publish | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
workflow_dispatch: | |
jobs: | |
npm-publish: | |
name: npm-publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@master | |
- name: Set up Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 18.17.1 | |
- name: install dependencies | |
run: yarn install | |
- name: Authenticate with Registry | |
run: | | |
echo "@adobe:registry=https://registry.npmjs.org/" > .npmrc | |
echo "registry=https://registry.npmjs.org/" >> .npmrc | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | |
npm whoami | |
env: # More info about the environment variables in the README | |
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} # This will be shared with your repo as an org secret | |
- name: transpile | |
run: yarn build | |
- name: skill lerna publish error | |
run: git stash | |
- name: lerna publish | |
run: npx lerna publish from-package --yes | |
env: # More info about the environment variables in the README | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated | |
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} # This will be shared with your repo as an org secret | |