|
| 1 | +name: Publish to Chromatic |
| 2 | +author: Chroma Software, Inc. |
| 3 | +description: 'Publish your Storybook to Chromatic and run visual regression tests' |
| 4 | +branding: |
| 5 | + icon: 'aperture' |
| 6 | + color: 'orange' |
| 7 | + |
| 8 | +inputs: |
| 9 | + allowConsoleErrors: |
| 10 | + description: 'Do not exit when runtime errors occur in storybook' |
| 11 | + required: false |
| 12 | + appCode: |
| 13 | + description: 'Deprecated, please use projectToken instead' |
| 14 | + required: false |
| 15 | + autoAcceptChanges: |
| 16 | + description: 'Automatically accept all changes in chromatic: boolean or branchname' |
| 17 | + required: false |
| 18 | + branchName: |
| 19 | + description: 'Override the branch name' |
| 20 | + required: false |
| 21 | + buildScriptName: |
| 22 | + description: 'The npm script that builds your Storybook [build-storybook]' |
| 23 | + required: false |
| 24 | + buildCommand: |
| 25 | + description: 'The command that builds your Storybook (when your build command does not exist in "scripts" of your package.json)' |
| 26 | + required: false |
| 27 | + configFile: |
| 28 | + description: 'Path from where to load the Chromatic config JSON file.' |
| 29 | + cypress: |
| 30 | + description: 'Run build against `@chromatic-com/cypress` test archives' |
| 31 | + required: false |
| 32 | + debug: |
| 33 | + description: 'Output verbose debugging information' |
| 34 | + required: false |
| 35 | + diagnostics: |
| 36 | + description: 'Deprecated, use diagnosticsFile instead' |
| 37 | + required: false |
| 38 | + diagnosticsFile: |
| 39 | + description: 'Write process context information to a JSON file' |
| 40 | + required: false |
| 41 | + dryRun: |
| 42 | + description: 'Run without actually publishing to Chromatic' |
| 43 | + required: false |
| 44 | + exitOnceUploaded: |
| 45 | + description: 'Exit with 0 once the built version has been sent to chromatic: boolean or branchname' |
| 46 | + required: false |
| 47 | + exitZeroOnChanges: |
| 48 | + description: 'Positive exit of action even when there are changes: boolean or branchname' |
| 49 | + required: false |
| 50 | + externals: |
| 51 | + description: 'Disable TurboSnap when any of these files have changed since the baseline build' |
| 52 | + required: false |
| 53 | + fileHashing: |
| 54 | + description: 'Whether to apply file hashing to skip uploading unchanged files (default: true)' |
| 55 | + required: false |
| 56 | + forceRebuild: |
| 57 | + description: 'Do not skip build when a rebuild is detected' |
| 58 | + required: false |
| 59 | + ignoreLastBuildOnBranch: |
| 60 | + description: 'Do not use the last build on this branch as a baseline if it is no longer in history (i.e. branch was rebased)' |
| 61 | + required: false |
| 62 | + logFile: |
| 63 | + description: 'Write CLI logs to a file' |
| 64 | + required: false |
| 65 | + logLevel: |
| 66 | + description: 'One of: silent, error, warn, info, debug (default: info)' |
| 67 | + required: false |
| 68 | + logPrefix: |
| 69 | + description: 'Custom prefix for log messages (default: current timestamp)' |
| 70 | + required: false |
| 71 | + only: |
| 72 | + description: 'Deprecated, replaced by onlyStoryNames' |
| 73 | + required: false |
| 74 | + onlyChanged: |
| 75 | + description: 'Enables TurboSnap: Only run stories affected by files changed since the baseline build' |
| 76 | + required: false |
| 77 | + onlyStoryNames: |
| 78 | + description: 'Only run a single story or a subset of stories by their name' |
| 79 | + required: false |
| 80 | + onlyStoryFiles: |
| 81 | + description: 'Only run a single story or a subset of stories by their filename(s)' |
| 82 | + required: false |
| 83 | + outputDir: |
| 84 | + description: 'Relative path to target directory containing your Storybook (a temporary directory is used if this is not set)' |
| 85 | + required: false |
| 86 | + playwright: |
| 87 | + description: 'Run build against `@chromatic-com/playwright` test archives' |
| 88 | + required: false |
| 89 | + preserveMissing: |
| 90 | + description: 'Deprecated, use onlyChanged, onlyStoryNames or onlyStoryFiles instead' |
| 91 | + required: false |
| 92 | + projectToken: |
| 93 | + description: 'Your chromatic project token (best provided via env.CHROMATIC_PROJECT_TOKEN)' |
| 94 | + required: false |
| 95 | + repositorySlug: |
| 96 | + description: 'Override the repository slug (e.g. ownerName/repositoryName)' |
| 97 | + required: false |
| 98 | + skip: |
| 99 | + description: 'Skip Chromatic tests, but mark the commit as passing' |
| 100 | + required: false |
| 101 | + skipUpdateCheck: |
| 102 | + description: 'Skips Chromatic CLI update check' |
| 103 | + required: false |
| 104 | + storybookBaseDir: |
| 105 | + description: 'Relative path from repository root to Storybook project root' |
| 106 | + required: false |
| 107 | + storybookBuildDir: |
| 108 | + description: 'Provide a directory with your built storybook; use if you have already built your storybook' |
| 109 | + required: false |
| 110 | + storybookConfigDir: |
| 111 | + description: 'Relative path from where you run Chromatic to your Storybook config directory' |
| 112 | + required: false |
| 113 | + storybookLogFile: |
| 114 | + description: 'Write Storybook build logs to a file' |
| 115 | + required: false |
| 116 | + token: |
| 117 | + description: 'Your github token' |
| 118 | + required: false |
| 119 | + traceChanged: |
| 120 | + description: 'Print dependency trace for changed files to affected story files; set to "expanded" to list individual modules' |
| 121 | + required: false |
| 122 | + untraced: |
| 123 | + description: 'Disregard these files and their dependencies when tracing dependent stories for TurboSnap' |
| 124 | + required: false |
| 125 | + uploadMetadata: |
| 126 | + description: 'Upload Chromatic metadata files as part of the published Storybook' |
| 127 | + required: false |
| 128 | + workingDir: |
| 129 | + description: 'Working directory for the package.json file' |
| 130 | + required: false |
| 131 | + zip: |
| 132 | + description: 'Publish your Storybook to Chromatic as a single zip file instead of individual content files' |
| 133 | + required: false |
| 134 | + junitReport: |
| 135 | + description: 'Write build results to a JUnit XML file' |
| 136 | + required: false |
| 137 | + |
| 138 | +outputs: |
| 139 | + code: |
| 140 | + description: 'The exit code for the current run of the Chromatic CLI' |
| 141 | + url: |
| 142 | + description: 'An alias for the build URL (e.g. https://www.chromatic.com/build?appId=<app id goes here>&number=<build number>)' |
| 143 | + buildUrl: |
| 144 | + description: 'The build URL (e.g. https://www.chromatic.com/build?appId=<app id goes here>&number=<build number>)' |
| 145 | + storybookUrl: |
| 146 | + description: 'The Storybook preview URL for your current branch / Pull Request (e.g. https://<app id goes here>-<branch hash>.chromatic.com/)' |
| 147 | + specCount: |
| 148 | + description: 'The number of stories in the published Storybook' |
| 149 | + componentCount: |
| 150 | + description: 'The number of components in the published Storybook' |
| 151 | + testCount: |
| 152 | + description: 'The number of tests on the build' |
| 153 | + changeCount: |
| 154 | + description: 'The number of tests with visual changes, including any inherited changes (e.g. due to TurboSnap)' |
| 155 | + errorCount: |
| 156 | + description: 'The number of tests with error(s), including any inherited errors (e.g. due to TurboSnap)' |
| 157 | + interactionTestFailuresCount: |
| 158 | + description: 'The number of stories with interaction test failures' |
| 159 | + actualCaptureCount: |
| 160 | + description: 'The number of captured snapshots' |
| 161 | + inheritedCaptureCount: |
| 162 | + description: 'The number of inherited (not captured) snapshots (e.g. due to TurboSnap)' |
| 163 | + |
| 164 | +runs: |
| 165 | + main: action/register.js |
| 166 | + using: node20 # Sync with `target` in tsup.config.ts |
0 commit comments