Skip to content

Commit 841322c

Browse files
Merge pull request #3 from aaronriekenberg/050622_cicd
Disable sources jar from publishing, add -Prelease.useLastTag=true.
2 parents e69040a + 92b67ba commit 841322c

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,13 @@
22

33
name: PR Validation
44

5-
# Controls when the workflow will run
65
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
86
pull_request:
9-
branches: [ main ]
10-
11-
# Allows you to run this workflow manually from the Actions tab
12-
workflow_dispatch:
7+
branches:
8+
- main
139

1410
jobs:
1511
build:
16-
1712
runs-on: ubuntu-latest
1813
permissions:
1914
contents: read

.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)