Skip to content

Commit

Permalink
ci: Looking for release-info bug
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Nov 16, 2023
1 parent b690527 commit b19ea53
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/action-release-info/source/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import core from "@actions/core";
import { context, getOctokit } from "@actions/github";
import { ReleaseInfo } from "./ReleaseInfo.js";

const isMainModule = import.meta.url.endsWith(process.argv[1]);

/**
* Execute the release info action.
*/
export const main = async (): Promise<void> => {
try {
core.info("Generating release information...");
const repo_token = core.getInput("repo_token", { required: true });
const releaseInfo = new ReleaseInfo({
context,
Expand All @@ -19,3 +22,7 @@ export const main = async (): Promise<void> => {
if (error instanceof Error) core.setFailed(error.message);
}
};

if (isMainModule) {
main().catch(console.error);
}

0 comments on commit b19ea53

Please sign in to comment.