Make draft release #7
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: Make draft release | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| shadow-jar: | |
| permissions: | |
| contents: write | |
| uses: qupath/actions/.github/workflows/github-release.yml@main | |
| with: | |
| java-version: "25" # This overrides the default '21' in the QuPath workflow | |
| attach-shadow-jar: | |
| needs: shadow-jar | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 25 | |
| - name: Build shadowJar | |
| run: ./gradlew shadowJar | |
| - name: Get release tag | |
| id: tag | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| TAG=$(gh release list --limit 1 --json tagName -q '.[0].tagName') | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| echo "Using tag: $TAG" | |
| - name: Upload shadowJar to draft release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release upload ${{ steps.tag.outputs.tag }} \ | |
| $(find build/libs -name "*-all.jar" | head -1) \ | |
| --clobber |