Skip to content

Publish NPM Dev

Publish NPM Dev #16

Workflow file for this run

name: Publish NPM Dev
on: workflow_dispatch
jobs:
deploy-npm-dev:
runs-on: macos-12
timeout-minutes: 30
steps:
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: NPM ^9.5.0
run: npm i -g npm@^9.5.0 --registry=https://registry.npmjs.org
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: Restore Dependency Cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-dependencies-cache-${{ hashFiles('**/package.json') }}
- name: NPM Install
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
npm whoami
npm install
- name: Version & Publish
env:
GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git config user.name "Github Workflow (on behalf of ${{ github.actor }})"
git config user.email "users.noreply.github.com"
echo $GITHUB_REF_NAME
npx lerna publish prerelease --conventional-commits --conventional-prerelease --preid dev-$(date +"%Y%m%dT%H%M%S") --dist-tag dev --allow-branch $GITHUB_REF_NAME --force-publish --no-verify-access --no-changelog --no-git-tag-version --no-push --yes