remove async in parser

This commit is contained in:
Conor Sloan
2024-04-15 16:11:50 +01:00
parent 18cf56a126
commit 3d3a333728
2 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -18,7 +18,7 @@ export async function run(): Promise<void> {
core.info(`Publishing action package version with options:`)
core.info(cfg.serializeOptions(options))
const semverTag: semver.SemVer = await parseSemverTagFromRef(options)
const semverTag: semver.SemVer = parseSemverTagFromRef(options)
// Ensure the correct SHA is checked out for the tag we're parsing, otherwise the bundled content will be incorrect.
await fsHelper.ensureTagAndRefCheckedOut(
@@ -84,9 +84,7 @@ export async function run(): Promise<void> {
// This action can be triggered by any workflow that specifies a tag as its GITHUB_REF.
// This includes releases, creating or pushing tags, or workflow_dispatch.
// See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#about-events-that-trigger-workflows.
async function parseSemverTagFromRef(
opts: cfg.PublishActionOptions
): Promise<semver.SemVer> {
function parseSemverTagFromRef(opts: cfg.PublishActionOptions): semver.SemVer {
const ref = opts.ref
if (!ref.startsWith('refs/tags/')) {