@@ -107,5 +107,67 @@ jobs:
107
107
path : app/build/native/nativeCompile/spotless*
108
108
retention-days : 7
109
109
if-no-files-found : " error"
110
- # TODO add job to check if jrelease distribute would be working
111
- # eg using `JRELEASER_GITHUB_TOKEN=123 jreleaser -Djreleaser.project.version=0.1.0 publish --dry-run`
110
+
111
+ dryRunRelease :
112
+ name : " dry run release"
113
+ needs : " nativeCompile"
114
+ strategy :
115
+ matrix :
116
+ platform :
117
+ - name : " linux-x86_64"
118
+ runner : " ubuntu-latest"
119
+ - name : " windows-x86_64"
120
+ runner : " windows-latest"
121
+ runs-on : " ${{ matrix.platform.runner }}"
122
+ steps :
123
+ - name : " Checkout"
124
+ uses : " actions/checkout@v4"
125
+ with :
126
+ fetch-depth : 0
127
+ - name : " Install JDK 21"
128
+ uses : " actions/setup-java@v4"
129
+ with :
130
+ distribution : " graalvm"
131
+ java-version : 21
132
+ - name : " Setup Gradle"
133
+ uses : " gradle/actions/setup-gradle@v4"
134
+ - name : " Retrieve binaries"
135
+ uses : " actions/download-artifact@v4"
136
+ with :
137
+ # no name - download all artifacts
138
+ path : " app/build/collected-binaries"
139
+ - name : " Get version and set to output"
140
+ id : get_version
141
+ run : echo "VERSION=$(./gradlew changelogPrintCurrentVersion -Prelease=true --quiet)" >> "$GITHUB_OUTPUT"
142
+ - name : " Dry-run choco distribution"
143
+ if : " ${{ matrix.platform.name == 'windows-x86_64' }}"
144
+ uses : jreleaser/release-action@v2
145
+ with :
146
+ setup-java : false
147
+ arguments : " publish --dry-run"
148
+ env :
149
+ JRELEASER_PROJECT_VERSION : ${{ steps.get_version.outputs.VERSION }}
150
+ JRELEASER_GITHUB_TOKEN : abc # don't provide correct token, just a dry-run
151
+ JRELEASER_DISTRIBUTIONS_SPOTLESS_CLI_CHOCOLATEY_ACTIVE : ALWAYS
152
+ JRELEASER_CHOCOLATEY_GITHUB_TOKEN : abc # don't provide correct token, just a dry-run
153
+ JRELEASER_CHOCOLATEY_API_KEY : abc # don't provide correct token, just a dry-run
154
+ - name : " Dry-run brew distribution"
155
+ if : " ${{ matrix.platform.name == 'linux-x86_64' }}"
156
+ uses : jreleaser/release-action@v2
157
+ with :
158
+ setup-java : false
159
+ arguments : " publish --dry-run"
160
+ env :
161
+ JRELEASER_PROJECT_VERSION : ${{ steps.get_version.outputs.VERSION }}
162
+ JRELEASER_GITHUB_TOKEN : abc # don't provide correct token, just a dry-run
163
+ JRELEASER_DISTRIBUTIONS_SPOTLESS_CLI_BREW_ACTIVE : ALWAYS
164
+ JRELEASER_HOMEBREW_GITHUB_TOKEN : abc # don't provide correct token, just a dry-run
165
+ - name : " Persist jreleaser output"
166
+ if : always()
167
+ uses : actions/upload-artifact@v4
168
+ with :
169
+ name : " jreleaser-distribution-dry-run--${{ matrix.platform.name }}"
170
+ path : |
171
+ out/jreleaser/trace.log
172
+ out/jreleaser/output.properties
173
+ out/jreleaser/package/spotless-cli/**
0 commit comments