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
Generated Vendored
+2 -2
View File
@@ -104876,7 +104876,7 @@ async function run() {
const options = await cfg.resolvePublishActionOptions();
core.info(`Publishing action package version with options:`);
core.info(cfg.serializeOptions(options));
const semverTag = await parseSemverTagFromRef(options);
const semverTag = 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(options.ref, options.sha, options.workspaceDir);
const stagedActionFilesDir = fsHelper.createTempDir(options.runnerTempDir, 'staging');
@@ -104906,7 +104906,7 @@ exports.run = run;
// 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) {
function parseSemverTagFromRef(opts) {
const ref = opts.ref;
if (!ref.startsWith('refs/tags/')) {
throw new Error(`The ref ${ref} is not a valid tag reference.`);
+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/')) {