forked from carbon-design-system/ibm-products
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.41 KB
/
release-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
49
50
51
# Publish canary release to NPM
name: Release - canary
# This workflow is triggered every time a change is pushed to the
# `main` branch
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-canary:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
timeout-minutes: 60
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: '0'
# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
- run: |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git config user.name $GITHUB_ACTOR
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Continuous integration check (includes build)
run: yarn ci-check
- name: Set NPM token
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.CARBON_BOT_NPM_TOKEN }}" >> .npmrc
# Publish release with canary tag to NPM using Lerna
- name: Publish canary release of packages
run: |
yarn lerna publish --canary --preid canary --dist-tag canary --yes