Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

ci: add canary release workflow #63

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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/[email protected]"'
required: true
type: string

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.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
Loading