Fix publish (again) #5
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
| # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
| name: Java CI with Gradle | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| env: | |
| PLUGIN_NAME: dicom-edit-routing | |
| PLUGIN_DIR: ${{ github.workspace }} | |
| GRADLE_OPTS: "-Dorg.gradle.daemon=false" | |
| GRADLE_USER_HOME: ${{ github.workspace }}/.gradle | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 11 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '11' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Print Gradle version | |
| run: ./gradlew --version | |
| - name: Build plugin | |
| run: | | |
| echo "Building plugin ${{ env.PLUGIN_NAME }}, located at ${{ env.PLUGIN_DIR }}. Using Gradle user home at ${{ env.GRADLE_USER_HOME }}" | |
| ./gradlew -p ${{ env.PLUGIN_DIR }} clean build | |
| - name: Extract version | |
| id: get_version | |
| run: | | |
| VERSION=$(./gradlew -p ${{ env.PLUGIN_DIR }} :version -q | tail -n 1) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "Built version $VERSION of plugin ${{ env.PLUGIN_NAME }}" | |
| - name: Upload JAR artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.PLUGIN_NAME }}-jar | |
| path: ${{ env.PLUGIN_DIR }}/build/libs/*.jar |