forked from cultureamp/kaizen-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.06 KB
/
canary-release.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
name: "Canary release"
on:
workflow_dispatch:
inputs:
label:
description: 'Pick a label for the release, to be included in the version number — e.g. "fix-button-focus" will released as "@kaizen/button@0.0.0-canary-fix-button-focus-20230719002814"'
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
LABEL: ${{ github.event.inputs.label }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- name: Set npm token
run: |
npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN"
- name: Create canary release and publish to npm
id: changesets
run: |
echo "🥚 Building canary-$LABEL"
yarn build
echo "🐣 Releasing canary-$LABEL"
yarn changeset version --snapshot "canary-$LABEL"
yarn changeset publish --tag "canary-$LABEL"
- name: Push tags
run: |
git push --follow-tags