mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-12-05 03:34:46 +01:00
⭐ E M O J I ✨
I still don't understand it why everybody likes them so much. But I feel the pressure of public opinion, which forced me to add these useless symbols to my codebase.
This commit is contained in:
parent
f8343090b1
commit
9900786be3
3 changed files with 12 additions and 12 deletions
|
@ -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 |
|
||||
|------|-------------|---------------|----------|
|
||||
|
|
12
src/index.ts
12
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}`));
|
||||
|
|
|
@ -70,7 +70,7 @@ export default class ModrinthPublisher extends ModPublisher {
|
|||
|
||||
private async unfeatureOlderVersions(id: string, token: string, unfeatureMode: UnfeatureMode, loaders: string[], gameVersions: string[]): Promise<void> {
|
||||
const unfeaturedVersions = new Array<string>();
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue