Skip to content

Commit

Permalink
fix: show note about manual config steps in semver-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrees committed Oct 31, 2022
1 parent f1d33de commit f36fc55
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions assets/inject/semver-workflow/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI & Release
on:
# Build on pushes to release branches
push:
branches: [main]
branches: []
# Build on pull requests targeting release branches
pull_request:
branches: [main]
branches: []
workflow_dispatch:
inputs:
release:
Expand Down
2 changes: 1 addition & 1 deletion assets/inject/semver-workflow/.releaserc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "@sanity/semantic-release-preset",
"branches": ["main"]
"branches": []
}
12 changes: 12 additions & 0 deletions src/presets/semver-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
writePackageJsonDirect,
} from '../npm/package'
import log from '../util/log'
import outdent from 'outdent'
import chalk from 'chalk'

export const semverWorkflowPreset: Preset = {
name: 'semver-workflow',
Expand Down Expand Up @@ -45,6 +47,16 @@ async function addDevDependencies(options: InjectOptions) {
newPkg.devDependencies = devDeps
await writePackageJsonDirect(newPkg, options)
log.info('Updated devDependencies.')

log.info(
chalk.green(
outdent`
You must configure branch-config in the following files manually:
- .release.json
- .github/workflows/main.yml
`.trim()
)
)
}

function semverWorkflowFiles(): FromTo[] {
Expand Down

0 comments on commit f36fc55

Please sign in to comment.