add test case for semver formats

This commit is contained in:
Conor Sloan
2023-11-22 14:25:27 +00:00
parent cceef5869f
commit a45c53b2f2
3 changed files with 82 additions and 71 deletions
+1
View File
@@ -30,6 +30,7 @@ export async function run(): Promise<void> {
// https://docs.github.com/en/actions/creating-actions/releasing-and-maintaining-actions
const targetVersion = semver.parse(releaseTag.replace(/^v/, ''))
if (!targetVersion) {
// TODO: We may want to limit semvers to only x.x.x, without the pre-release tags, but for now we'll allow them.
core.setFailed(
`${releaseTag} is not a valid semantic version, and so cannot be uploaded as an Immutable Action.`
)