publish-nightly (Publish Nightly release to NPM) #413
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-nightly (Publish Nightly release to NPM) | |
on: | |
schedule: | |
- cron: '0 1 * * 1-5' | |
concurrency: | |
group: publish-nightly-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
publish: | |
if: github.repository == 'carbon-design-system/carbon-for-ibm-dotcom' | |
runs-on: ubuntu-20.04 | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: Build project | |
run: yarn build | |
- name: Set NPM token | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_API_KEY }}" >> .npmrc | |
- name: Run Lerna | |
run: yarn lerna publish --no-verify-access --canary minor --dist-tag nightly --preid nightly.${{github.run_id}} --no-push --no-git-tag-version --yes | |
- uses: act10ns/slack@v2 | |
with: | |
status: ${{ job.status }} | |
if: failure() |