Skip to content

Commit

Permalink
Merge pull request #663 from crs-k/double-release-fix
Browse files Browse the repository at this point in the history
double release fix
  • Loading branch information
crs-k authored Apr 6, 2024
2 parents d2f4ec5 + 973a95e commit fc21da3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
15 changes: 11 additions & 4 deletions dist/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 dist/index.js.map

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions src/functions/get-next-release-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ import * as core from '@actions/core'
import {releaseStrategy} from './get-context'

export async function getNextReleaseType(previousReleaseType: string): Promise<string> {
let nextReleaseType: string
let nextReleaseType = ''

try {
if (
previousReleaseType === 'production' &&
(releaseStrategy === 'triple' || releaseStrategy === 'double')
) {
nextReleaseType = 'alpha'
if (previousReleaseType === 'production') {
if (releaseStrategy === 'triple') {
nextReleaseType = 'alpha'
} else if (releaseStrategy === 'double') {
nextReleaseType = 'beta'
}
} else if (previousReleaseType === 'alpha' && releaseStrategy === 'triple') {
nextReleaseType = 'beta'
} else if (previousReleaseType === 'beta' && releaseStrategy === 'double') {
nextReleaseType = 'production'
} else {
nextReleaseType = 'production'
}
Expand Down

0 comments on commit fc21da3

Please sign in to comment.