Skip to content

Commit 5b97fd3

Browse files
Disable sources jar from publishing, add -Prelease.useLastTag=true.
1 parent e69040a commit 5b97fd3

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

.github/workflows/gradle-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
- name: Build with Gradle
3333
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
3434
with:
35-
arguments: build
35+
arguments: -Prelease.useLastTag=true build
3636

3737
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
3838
# the publishing section of your build.gradle
3939
- name: Publish to GitHub Packages
4040
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
4141
with:
42-
arguments: publish
42+
arguments: -Prelease.useLastTag=true publish
4343
env:
4444
USERNAME: ${{ github.actor }}
4545
TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,6 @@ java {
6969
withSourcesJar()
7070
}
7171

72-
publishing {
73-
repositories {
74-
mavenLocal()
75-
}
76-
publications {
77-
register("mavenJava", MavenPublication::class) {
78-
from(components["java"])
79-
artifact(tasks.findByName("sourcesJar"))
80-
}
81-
}
82-
}
83-
8472
jacoco {
8573
toolVersion = "0.8.7"
8674
}

0 commit comments

Comments
 (0)