PLUGINS-234 & PLUGINS-235 #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Publish | |
| # Thin caller around the shared reusable workflow in | |
| # NrgXnat/xnat-ci-workflows. Plugin variant — no GHCR Docker image | |
| # (plugins ship a jar to JFrog only). | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - 'releases/*' # RC / release branches, e.g. releases/1.6.0-rc | |
| workflow_dispatch: | |
| inputs: | |
| publish_jfrog: | |
| description: 'Publish jar to JFrog Artifactory (nrgxnat)' | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| packages: write # required by reusable workflow's publish-ghcr job (gated by if: inputs.publish-ghcr but parsed at startup) | |
| jobs: | |
| build-publish: | |
| uses: NrgXnat/xnat-ci-workflows/.github/workflows/gradle-build-publish.yml@v1 | |
| with: | |
| # ──── Artifact ──── | |
| artifact-glob: 'build/libs/*.jar' | |
| artifact-name: 'xsync-plugin-jar' | |
| # ──── JFrog ──── | |
| # On any push to a triggered branch: publish. On dispatch: only when publish_jfrog ticked. | |
| publish-jfrog: ${{ github.event_name == 'push' || inputs.publish_jfrog }} | |
| # publish-ghcr deliberately omitted — defaults to false in the reusable workflow. | |
| # secrets: inherit passes XNAT_ARTIFACTORY_USER/TOKEN (org-level) and | |
| # the auto-injected GITHUB_TOKEN through to the reusable workflow. | |
| secrets: inherit |