diff --git a/README.md b/README.md index 428511c..ccf2535 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The `Publish Minecraft Mods` action helps you upload assets of your Minecraft mods to GitHub Releases, Modrinth and CurseForge. This is a cross-platform action that runs on any environment. -### Usage +### 📖 Usage Most of the values are automatically resolved *(read further for more info)*. Therefore, here's all you really need to publish your mod: @@ -32,7 +32,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} ``` -### Unnecessary Verbose Example +### 📖🦜 Unnecessary Verbose Example Please, **do not** consider the following example as something you should use. `mc-publish` was made to be as zero-configy as possible, you just do not need all this. It's here to show you most of the available inputs in the form of an actual configuration. It not only hurts me on a spiritual level to see configurations with hardcoded values that could be automatically resolved, but sometimes people copy-paste inputs that will break their workflows, e.g., I saw someone trying to use `github-discussion: Announcements` in repo that had neither "Announcements" discussion category, nor discussions in general. [Occam's Razor](https://en.wikipedia.org/wiki/Occam%27s_razor) in action - if you don't see a reason to use an input, just don't use it. With all that said, let's get back to our unnecessary verbose example: @@ -91,7 +91,7 @@ jobs: fail-mode: fail ``` -### Inputs +### 📝 Inputs | Name | Description | Default value | Examples | |------|-------------|---------------|----------| diff --git a/src/index.ts b/src/index.ts index 6db5195..a5def11 100644 --- a/src/index.ts +++ b/src/index.ts @@ -40,11 +40,11 @@ async function main() { delay: retryDelay, errorCallback: (e: Error) => { logger.error(e); - logger.info(`Retrying to publish assets to ${targetName} in ${retryDelay} ms...`); + logger.info(`🔂 Retrying to publish assets to ${targetName} in ${retryDelay} ms...`); } }; - const stopwatch = LoggingStopwatch.startNew(logger, `Publishing assets to ${targetName}...`, ms => `Successfully published assets to ${targetName} (in ${ms} ms)`); + const stopwatch = LoggingStopwatch.startNew(logger, `📤 Publishing assets to ${targetName}...`, ms => `✅ Successfully published assets to ${targetName} (in ${ms} ms)`); try { await retry(func); } catch(e: any) { @@ -53,7 +53,7 @@ async function main() { logger.warn(e); continue; case FailMode.Skip: - logger.warn(`An error occurred while uploading assets to ${targetName}`); + logger.warn(`☢️ An error occurred while uploading assets to ${targetName}`); errors.push(e); continue; default: @@ -65,9 +65,9 @@ async function main() { } if (publishedTo.length) { - logger.info(`Your assets have been successfully published to: ${publishedTo.join(", ")}`); + logger.info(`🎉 Your assets have been successfully published to: ${publishedTo.join(", ")}`); } else if (!errors.length) { - logger.warn("You didn't specify any targets, your assets have not been published"); + logger.warn("🗿 You didn't specify any targets, your assets have not been published"); } if (errors.length) { @@ -75,4 +75,4 @@ async function main() { } } -main().catch(error => getDefaultLogger().fatal(error instanceof Error ? error : `Something went horribly wrong: ${error}`)); +main().catch(error => getDefaultLogger().fatal(error instanceof Error ? error : `💀 Something went horribly wrong: ${error}`)); diff --git a/src/publishing/modrinth/modrinth-publisher.ts b/src/publishing/modrinth/modrinth-publisher.ts index 5d6f475..9309717 100644 --- a/src/publishing/modrinth/modrinth-publisher.ts +++ b/src/publishing/modrinth/modrinth-publisher.ts @@ -70,7 +70,7 @@ export default class ModrinthPublisher extends ModPublisher { private async unfeatureOlderVersions(id: string, token: string, unfeatureMode: UnfeatureMode, loaders: string[], gameVersions: string[]): Promise { const unfeaturedVersions = new Array(); - const stopwatch = LoggingStopwatch.startNew(this.logger, "Unfeaturing older Modrinth versions...", ms => `Successfully unfeatured: ${unfeaturedVersions.join(", ")} (in ${ms} ms)`); + const stopwatch = LoggingStopwatch.startNew(this.logger, "📝 Unfeaturing older Modrinth versions...", ms => `✅ Successfully unfeatured: ${unfeaturedVersions.join(", ")} (in ${ms} ms)`); const versionSubset = hasFlag(unfeatureMode, UnfeatureMode.VersionSubset); const loaderSubset = hasFlag(unfeatureMode, UnfeatureMode.LoaderSubset); @@ -87,14 +87,14 @@ export default class ModrinthPublisher extends ModPublisher { if (await modifyVersion(olderVersion.id, { featured: false }, token)) { unfeaturedVersions.push(olderVersion.id); } else { - this.logger.warn(`Cannot unfeature version ${olderVersion.id}`); + this.logger.warn(`⚠️ Cannot unfeature version ${olderVersion.id}`); } } if (unfeaturedVersions.length) { stopwatch.stop(); } else { - this.logger.info("No versions to unfeature were found"); + this.logger.info("✅ No versions to unfeature were found"); } } } \ No newline at end of file