diff --git a/.github/workflows/ci-tests-nightly.yml b/.github/workflows/ci-tests-nightly.yml index eca6669f..a5f5d38e 100644 --- a/.github/workflows/ci-tests-nightly.yml +++ b/.github/workflows/ci-tests-nightly.yml @@ -94,7 +94,7 @@ jobs: run: chmod +x gradlew - name: Publish gradle nightly jar - run: ./gradlew publishNightlyMavenPublicationToGitHubPackagesRepository + run: ./gradlew publishNightlyPublicationToGitHubPackagesRepository env: CM_RELEASE: false GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} diff --git a/.github/workflows/manual-gh-packages.yml b/.github/workflows/manual-gh-packages.yml index 3155520e..ad46ea6f 100644 --- a/.github/workflows/manual-gh-packages.yml +++ b/.github/workflows/manual-gh-packages.yml @@ -118,7 +118,7 @@ jobs: run: chmod +x gradlew - name: Publish JAR with Gradle - run: ./gradlew publish -x test + run: ./gradlew publishReleasePublicationToGitHubPackagesRepository -x test env: CM_RELEASE: true GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml index f6024936..314ebde1 100644 --- a/.github/workflows/tagged-release.yml +++ b/.github/workflows/tagged-release.yml @@ -120,7 +120,7 @@ jobs: run: chmod +x gradlew - name: Publish package - run: ./gradlew publishMavenPublicationToGitHubPackagesRepository -x test + run: ./gradlew publishReleasePublicationToGitHubPackagesRepository -x test env: CM_RELEASE: true GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} diff --git a/build.gradle b/build.gradle index 4cb92a5c..bb0df273 100644 --- a/build.gradle +++ b/build.gradle @@ -209,7 +209,7 @@ jar { "Specification-Vendor" : "", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, - "Implementation-Version" : version, + "Implementation-Version" : archiveVersion, "Implementation-Vendor" : "", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) @@ -229,10 +229,10 @@ artifacts { publishing { publications { - maven(MavenPublication) { + release(MavenPublication) { artifactId = mod_id - group = "dev.compactmods" - + groupId = "dev.compactmods" + artifacts { artifact jar artifact(apiJar) { @@ -241,9 +241,10 @@ publishing { } } - nightlyMaven(MavenPublication) { + nightly(MavenPublication) { artifactId = mod_id - group = "dev.compactmods.nightly" + groupId = "dev.compactmods.nightly" + version = "${mod_version}+nightly-${gitCommitHash}" artifacts { artifact(jar)