Merge c49334a3cce2754af28d0d47168357ce6a8163b2 into main #7
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-canary (Publish Canary release to NPM) | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: publish-canary-${{ 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 --preid canary.${{github.run_id}} --dist-tag canary --force-publish --no-push --no-git-tag-version --yes | |
- name: Deploy NextJS Test | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
repository: carbon-design-system/carbon-for-ibm-dotcom-nextjs-test | |
token: ${{ secrets.GH_DISPATCH_TOKEN }} | |
event-type: deploy-canary | |
- name: Deploy Web Components HTML Test | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
repository: carbon-design-system/carbon-for-ibm-dotcom-web-components-test | |
token: ${{ secrets.GH_DISPATCH_TOKEN }} | |
event-type: deploy-canary | |
- uses: act10ns/slack@v2 | |
with: | |
status: ${{ job.status }} | |
if: failure() |