chore: Merge support into master (#3033) #970
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: Release | |
on: | |
push: | |
branches: | |
- master | |
- support | |
workflow_dispatch: # Allow manual triggering of this job in case of failures | |
inputs: | |
version: | |
description: | |
'The version override. Example: "8.1.2". Leave blank if you want conventional commits to | |
decide which version' | |
required: false | |
jobs: | |
release: | |
# Only run if: | |
# - The commit message does not contain `[skip release]` | |
# - OR the workflow was manually triggered and has a `version` string | |
if: "!contains(github.event.head_commit.message, '[skip release]') || inputs.version" | |
runs-on: ubuntu-latest | |
steps: | |
## First, we'll checkout the repository. We don't persist credentials because we need a | |
## Personal Access Token to push on a branch that is protected. See | |
## https://github.com/cycjimmy/semantic-release-action#basic-usage | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 # Used for conventional commit ranges | |
- uses: Workday/canvas-kit-actions/install@v1 | |
with: | |
node_version: 18.x | |
- uses: Workday/canvas-kit-actions/release@v1 | |
with: | |
gh_token: ${{ secrets.GITHUB_TOKEN }} | |
gh_rw_token: ${{ secrets.GH_RW_TOKEN }} | |
publish_token: ${{ secrets.NPM_CI_PUBLISH_TOKEN }} | |
chromatic_project_token: ${{ secrets.CHROMATIC_APP_CODE }} | |
version: ${{ inputs.version || 'patch' }} | |
- uses: Workday/canvas-kit-actions/report-failure@v1 | |
if: failure() | |
with: | |
slackWebhook: ${{ secrets.SLACK_WEBHOOK }} | |
slackMessage: | | |
Release job failed. Please check error logs. |