Skip to content

Commit 5d11dde

Browse files
committed
chore(ci): prepare checking of java binary
1 parent d3b6866 commit 5d11dde

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ jobs:
4949
run: "./gradlew :build-logic:check --no-configuration-cache"
5050
- name: "Run check on project"
5151
run: "./gradlew generateUsage && ./gradlew check"
52+
- name: "Create dist zip (java binary)"
53+
run: "./gradlew distZip"
54+
- name: "upload dist-zip" # for debugging
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: "dist-zip"
58+
path: app/build/distributions/spotless-*.zip
59+
retention-days: 7
60+
if-no-files-found: "error"
5261
- name: "Get version and set to output"
5362
id: get_version
5463
run: echo "VERSION=$(./gradlew changelogPrintCurrentVersion --quiet)" >> "$GITHUB_OUTPUT"
@@ -82,17 +91,11 @@ jobs:
8291
java-version: 21
8392
- name: "Setup Gradle"
8493
uses: "gradle/actions/setup-gradle@v4"
85-
- name: "Retrieve binaries"
94+
- name: "Retrieve dist-zip"
8695
uses: "actions/download-artifact@v4"
8796
with:
88-
# no name - download all artifacts
89-
path: "app/build/collected-binaries"
90-
- name: "Make sure downloaded binaries are executable"
91-
if: "${{ matrix.platform.name == 'linux-x86_64' }}"
92-
run: |
93-
find app/build/collected-binaries -type f -name "spotless*" -exec chmod +x {} \;
94-
- name: "Prepare release zips for distribution"
95-
run: "./gradlew -PreleaseBinariesRootDir=app/build/collected-binaries prepareReleaseBinaryZips"
97+
name: "dist-zip"
98+
path: "app/build/distributions"
9699
- name: "Prepare jreleaser for distribution"
97100
run: "./gradlew prepareJReleaserConfig"
98101
env:

build-logic/src/main/groovy/buildlogic.changelog-conventions.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
id 'com.diffplug.spotless-changelog'
3-
id 'buildlogic.release-prepare-packages-conventions'
43
}
54

65
spotlessChangelog {
@@ -15,7 +14,7 @@ spotlessChangelog {
1514
commitMessage "Published v{{version}}"
1615
tagPrefix "v"
1716
// https://cli.github.com/manual/gh_release_create
18-
runAfterPush "gh release create v{{version}} --title 'spotless-cli v{{version}}' --notes-file app/build/release-notes.md --verify-tag ${getPathsOfReleaseBinaryZips().join(' ')}"
17+
runAfterPush "gh release create v{{version}} --title 'spotless-cli v{{version}}' --notes-file app/build/release-notes.md --verify-tag ${layout.buildDirectory.dir('distributions').get().file('spotless-cli-{{version}}.zip').asFile.absolutePath}"
1918
}
2019

2120
version = spotlessChangelog.versionNext

0 commit comments

Comments
 (0)