diff --git a/.github/release-notes/v1.0.1.md b/.github/release-notes/v1.0.1.md new file mode 100644 index 0000000..58cc471 --- /dev/null +++ b/.github/release-notes/v1.0.1.md @@ -0,0 +1,3 @@ +## Added + +- `/sharedgroup stop` lets the group owner end an active game while keeping the group together. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2327b65..d42024f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ permissions: jobs: release: runs-on: ubuntu-latest + environment: MODRINTH_TOKEN steps: - name: Check out the repository @@ -44,9 +45,26 @@ jobs: - name: Publish the GitHub release env: GH_TOKEN: ${{ github.token }} - run: >- - gh release create "$GITHUB_REF_NAME" - build/libs/*.jar - --verify-tag - --generate-notes - --title "$GITHUB_REF_NAME" + run: | + if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then + echo "GitHub release $GITHUB_REF_NAME already exists." + exit 0 + fi + + notes_file=".github/release-notes/${GITHUB_REF_NAME}.md" + if [[ -f "$notes_file" ]]; then + gh release create "$GITHUB_REF_NAME" build/libs/*.jar \ + --verify-tag --notes-file "$notes_file" --title "$GITHUB_REF_NAME" + else + gh release create "$GITHUB_REF_NAME" build/libs/*.jar \ + --verify-tag --generate-notes --title "$GITHUB_REF_NAME" + fi + + - name: Publish the Modrinth version + env: + GH_TOKEN: ${{ github.token }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + run: | + test -n "$MODRINTH_TOKEN" + MODRINTH_CHANGELOG="$(gh release view "$GITHUB_REF_NAME" --json body --jq .body)" \ + ./gradlew modrinth diff --git a/README.md b/README.md index bd43128..2bdda5b 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,12 @@ | `/sharedgroup remove [player]` | Remove a player from your group | OP, group owner | | `/sharedgroup revoke` | Delete the group and remove all its players | OP, group owner | | `/sharedgroup start` | Start the game and stat synchronization | OP, group owner | +| `/sharedgroup stop` | Stop an active game without deleting the group | Group owner | | `/sharedgroup players` | List the online players in your group | Group member | | `/sharedgroup version` | Display the plugin version | None | ## What remains to be done -- Add the `/sharedgroup stop` command. - Synchronize players' food levels and saturation. - Add automated tests for the group lifecycle and stat synchronization. diff --git a/build.gradle.kts b/build.gradle.kts index a496734..c363349 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,9 +1,21 @@ plugins { id("java") + id("com.modrinth.minotaur") version "2.10.0" } group = "fr.korastrip.sharedstats" -version = "1.0.0" +version = "1.0.1" + +modrinth { + projectId.set("c9FDN1zY") + versionNumber.set(project.version.toString()) + versionType.set("release") + uploadFile.set(tasks.jar) + changelog.set(providers.environmentVariable("MODRINTH_CHANGELOG").orElse("Release ${project.version}")) + + gameVersions.addAll("26.2") + loaders.add("paper") +} repositories { mavenCentral() diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0cd8a1b..83283e4 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: SharedHealth -version: 1.0.0 +version: 1.0.1 main: fr.korastrip.paperplugin.SharedStats author: Kora description: Shared your food and your health with your friends.