@@ -9,13 +9,14 @@ name: Release
99# fails publishes nothing, and its deployments can be dropped in the Portal.
1010#
1111# Once Maven Central serves both, the Gradle plugins go to the Gradle Plugin Portal, signed with the same
12- # release key. After publishing, a draft GitHub release on the tag collects the runnable jar, the Gradle
12+ # release key, and the IntelliJ plugin goes to the JetBrains Marketplace, verified against the IDEs it
13+ # supports first. After publishing, a draft GitHub release on the tag collects the runnable jar, the Gradle
1314# and IDE plugins and the native binaries.
1415#
15- # Needs six repository secrets: JRELEASER_MAVENCENTRAL_USERNAME and JRELEASER_MAVENCENTRAL_PASSWORD (the
16- # Central Portal user token), JRELEASER_GPG_SECRET_KEY and JRELEASER_GPG_PASSPHRASE, and
17- # GRADLE_PUBLISH_KEY and GRADLE_PUBLISH_SECRET (the Gradle Plugin Portal key). The draft release uses the
18- # workflow's own GITHUB_TOKEN.
16+ # Needs seven repository secrets: JRELEASER_MAVENCENTRAL_USERNAME and JRELEASER_MAVENCENTRAL_PASSWORD (the
17+ # Central Portal user token), JRELEASER_GPG_SECRET_KEY and JRELEASER_GPG_PASSPHRASE, GRADLE_PUBLISH_KEY and
18+ # GRADLE_PUBLISH_SECRET (the Gradle Plugin Portal key) and JETBRAINS_MARKETPLACE_TOKEN (a permanent token of
19+ # the Marketplace account that owns the plugin). The draft release uses the workflow's own GITHUB_TOKEN.
1920on :
2021 push :
2122 tags :
@@ -270,6 +271,45 @@ jobs:
270271 JRELEASER_GPG_SECRET_KEY : ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
271272 JRELEASER_GPG_PASSPHRASE : ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
272273
274+ # The IntelliJ plugin carries the formatter jars inside its zip, so it does not wait for Maven Central. It
275+ # waits for the publish job like everything else, so that a version whose jars or native images failed
276+ # stays off the Marketplace too. The plugin is checked against the IDEs it declares support for before it
277+ # goes up; a plugin that fails there would fail JetBrains' own check after the upload anyway. The
278+ # Marketplace never takes a version back and rejects a version it already has, so a re-run of this job
279+ # fails once the upload went through.
280+ jetbrains-plugin :
281+ name : JetBrains Marketplace
282+ needs : publish
283+ runs-on : ubuntu-latest
284+ timeout-minutes : 60
285+ steps :
286+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
287+ with :
288+ fetch-depth : 0
289+
290+ - name : Install JDK 21
291+ uses : actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
292+ with :
293+ distribution : temurin
294+ java-version : ' 21'
295+
296+ - name : Verify the plugin against the IDEs it supports
297+ run : ./gradlew :open-java-format-idea-plugin:verifyPlugin
298+
299+ - name : Keep the verifier's report
300+ if : ${{ failure() }}
301+ uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
302+ with :
303+ name : plugin-verifier-report
304+ path : open-java-format-idea-plugin/build/reports/pluginVerifier
305+ if-no-files-found : ignore
306+ retention-days : 7
307+
308+ - name : Upload the plugin
309+ run : ./gradlew :open-java-format-idea-plugin:publishPlugin
310+ env :
311+ JETBRAINS_MARKETPLACE_TOKEN : ${{ secrets.JETBRAINS_MARKETPLACE_TOKEN }}
312+
273313 # What Maven Central does not carry — the runnable formatter jar, the Gradle plugins' jar, the IntelliJ
274314 # plugin zip, the Eclipse plugin jar, and every platform's native binary as a plain download — goes into
275315 # a draft GitHub release on the tag, each file signed with the release key. Only once both deployments
0 commit comments