Canary release #176
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: "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/[email protected]"' | |
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@v4 | |
- 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" | |
pnpm build | |
echo "🐣 Releasing canary-$LABEL" | |
pnpm changeset version --snapshot "canary-$LABEL" | |
pnpm changeset publish --tag "canary-$LABEL" | |
- name: Push tags | |
run: | | |
git push --follow-tags |