Skip to content

Commit

Permalink
fix: releasing from non-default branch (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
sparten11740 authored Oct 17, 2024
1 parent 5332b44 commit 6dc0162
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/version/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default async function version({
const client = github.getOctokit(token)
const defaultBranch = await getDefaultBranch({ client, repo })

if (baseBranch && baseBranch !== defaultBranch && canUseFromNonDefaultBranch(versionStrategy)) {
if (baseBranch && baseBranch !== defaultBranch && !canUseFromNonDefaultBranch(versionStrategy)) {
core.setFailed(`Version strategy ${versionStrategy} cannot be used from a non-default branch`)
return
}
Expand Down

0 comments on commit 6dc0162

Please sign in to comment.