diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index fde9d7449..47d5e91e5 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -21,8 +21,3 @@ jobs: java-version: 11 - name: Build with Gradle run: ./gradlew build - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: artifact - path: build/libs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e96bb1bde..a7b7a39d6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,4 +23,4 @@ jobs: env: HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }} MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} - run: ./gradlew publishAllPublicationsToHangar # add 'modrinth' after it is approved + run: ./gradlew build modrinth publishAllPublicationsToHangar --stacktrace diff --git a/gradle.properties b/gradle.properties index a306b442b..702c62352 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,8 @@ # Project properties - we put these here so they can be modified without causing a recompile of the build scripts projectVersion=4.8.0-23w32a-SNAPSHOT -mcVersions=1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5, 1.15.2, 1.14.4, 1.8.9 + +# Smile emoji +mcVersions=1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11.1, 1.11, 1.10.2, 1.10.1, 1.10, 1.9.4, 1.9.3, 1.9.2, 1.9.1, 1.9, 1.8.9 mcVersionRange=1.8-1.20.1 waterfallVersion=1.20 velocityVersion=3.2 diff --git a/universal/build.gradle.kts b/universal/build.gradle.kts index 0b6a46314..4c29f314b 100644 --- a/universal/build.gradle.kts +++ b/universal/build.gradle.kts @@ -44,8 +44,14 @@ tasks { publishShadowJar() val branch = rootProject.branchName() -val ver = (project.version as String) + "+" + System.getenv("GITHUB_RUN_NUMBER") -val changelogContent = rootProject.lastCommitMessage() +val baseVersion = project.version as String +val isRelease = !baseVersion.contains('-') +val suffixedVersion = if (isRelease) baseVersion else baseVersion + "+" + System.getenv("GITHUB_RUN_NUMBER") +val changelogContent = if (isRelease) { + "See [GitHub](https://github.com/ViaVersion/ViaVersion) for release notes." +} else { + rootProject.lastCommitMessage() +} val isMainBranch = branch == "master" modrinth { val mcVersions: List = (property("mcVersions") as String) @@ -53,13 +59,18 @@ modrinth { .map { it.trim() } token.set(System.getenv("MODRINTH_TOKEN")) projectId.set("viaversion") - versionType.set(if (isMainBranch) "beta" else "alpha") - versionNumber.set(ver) - versionName.set("[$branch] $ver") + versionType.set(if (isRelease) "release" else if (isMainBranch) "beta" else "alpha") + versionNumber.set(suffixedVersion) + versionName.set(suffixedVersion) changelog.set(changelogContent) uploadFile.set(tasks.shadowJar.flatMap { it.archiveFile }) gameVersions.set(mcVersions) loaders.add("fabric") + loaders.add("paper") + loaders.add("folia") + loaders.add("velocity") + loaders.add("bungeecord") + loaders.add("sponge") autoAddDependsOn.set(false) detectLoaders.set(false) dependencies { @@ -71,9 +82,9 @@ modrinth { if (isMainBranch) { // Don't spam releases until Hangar has per channel notifications hangarPublish { publications.register("plugin") { - version.set(ver) + version.set(suffixedVersion) namespace("ViaVersion", "ViaVersion") - channel.set(if (isMainBranch) "Snapshot" else "Alpha") + channel.set(if (isRelease) "Release" else if (isMainBranch) "Snapshot" else "Alpha") changelog.set(changelogContent) apiKey.set(System.getenv("HANGAR_TOKEN")) platforms {