-
Notifications
You must be signed in to change notification settings - Fork 160
48 lines (45 loc) · 1.6 KB
/
publish-canary.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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@v2
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@v2
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()