-
Notifications
You must be signed in to change notification settings - Fork 0
Bumb to version 1.3.3 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
36742d7
bb46150
55470ae
53c9c4a
0e7a15d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -105,34 +105,20 @@ jobs: | |||||
| fi | ||||||
|
|
||||||
| - name: Build (package) | ||||||
| run: mvn -B -s $GITHUB_WORKSPACE/settings.xml package | ||||||
| run: mvn -B -s $GITHUB_WORKSPACE/settings.xml -DskipTests -Pwith-shade package | ||||||
|
|
||||||
| - name: Deploy Release to GitHub Packages | ||||||
| env: | ||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
| run: mvn -B -s $GITHUB_WORKSPACE/settings.xml -DskipTests deploy | ||||||
|
|
||||||
| - name: Verify built artifacts | ||||||
| run: | | ||||||
| set -e | ||||||
| echo "Contents of target/:" | ||||||
| ls -1 target | ||||||
| # Capture a primary jar (non sources/javadoc) for convenience | ||||||
| MAIN_JAR=$(ls target/*.jar | grep -v '\-sources\.jar$' | grep -v '\-javadoc\.jar$' | head -n1 || true) | ||||||
| if [[ -z "$MAIN_JAR" ]]; then | ||||||
| echo "ERROR: No main artifact jar found." | ||||||
| exit 1 | ||||||
| fi | ||||||
| cp "$MAIN_JAR" main-artifact.jar | ||||||
| echo "Selected main artifact: $MAIN_JAR" | ||||||
|
|
||||||
| - name: Create & Push Git Tag | ||||||
| run: | | ||||||
| set -e | ||||||
| TAG="${{ steps.version.outputs.version }}" | ||||||
| if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then | ||||||
| echo "Tag ${TAG} already exists unexpectedly (race condition?)." | ||||||
| exit 1 | ||||||
| echo "Tag ${TAG} already exists unexpectedly (race condition?)." | ||||||
| exit 1 | ||||||
| fi | ||||||
| git config user.name "github-actions[bot]" | ||||||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||||||
|
|
@@ -146,9 +132,7 @@ jobs: | |||||
| name: "SingularityLib ${{ steps.version.outputs.version }}" | ||||||
| generate_release_notes: true | ||||||
| files: | | ||||||
| target/*-sources.jar | ||||||
| target/*-javadoc.jar | ||||||
| main-artifact.jar | ||||||
| `target/*.jar` | ||||||
|
||||||
| `target/*.jar` | |
| target/*.jar |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| package com.github.pinont.singularitylib.api.utils; | ||
|
|
||
| import com.github.pinont.singularitylib.api.enums.PlayerInventorySlotType; | ||
| import com.github.pinont.singularitylib.api.manager.ConfigManager; | ||
| import com.github.pinont.singularitylib.plugin.CorePlugin; | ||
| import net.kyori.adventure.text.Component; | ||
| import net.kyori.adventure.text.minimessage.MiniMessage; | ||
| import org.bukkit.Bukkit; | ||
|
|
@@ -28,6 +30,17 @@ public class Common { | |
| public Common() { | ||
| } | ||
|
|
||
| /** | ||
| * Gets the current API version. | ||
| * | ||
| * @return the API version string | ||
| */ | ||
| public static String getAPIVersion() { | ||
| ConfigManager apiConfig = new ConfigManager(CorePlugin.getInstance(), "api-version.yml"); | ||
| String version = apiConfig.getConfig().getString("api-version", "1.0.0"); | ||
| return "V-" + version; | ||
| } | ||
|
Comment on lines
+38
to
+42
|
||
|
|
||
| /** | ||
| * Colorizes a string message using MiniMessage format. | ||
| * | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| api-version: ${version} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is inconsistent. The closing
fistatement should be aligned with the openingifstatement. This should be: