Release #27
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: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version' | |
| required: true | |
| dry-run: | |
| description: 'Dry run' | |
| type: boolean | |
| required: true | |
| default: false | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '25' | |
| distribution: 'zulu' | |
| - name: Cache Gradle | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
| restore-keys: ${{ runner.os }}-gradle- | |
| - name: Build | |
| run: ./gradlew build | |
| env: | |
| GH_PACKAGES_READ_TOKEN: ${{ secrets.GH_PACKAGES_READ_TOKEN }} | |
| GH_PACKAGES_WRITE_TOKEN: ${{ secrets.GH_PACKAGES_WRITE_TOKEN }} | |
| IPREGISTRY_API_KEY: ${{ secrets.IPREGISTRY_API_KEY }} | |
| IPREGISTRY_DATASETS_SECRET_KEY: ${{ secrets.IPREGISTRY_DATASETS_SECRET_KEY }} | |
| - name: Publish artifacts to staging | |
| run: ./gradlew publish | |
| - name: Deploy to Maven Central and Create GitHub Release | |
| env: | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
| JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | |
| JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | |
| run: | | |
| mkdir -p build/jreleaser | |
| echo "=== Staging directory contents ===" | |
| find build/staging-deploy -type f -ls || echo "No staging directory found" | |
| echo "=== Running JReleaser Deploy ===" | |
| ./gradlew jreleaserDeploy --stacktrace ${{ inputs.dry-run && '--dryrun' || '' }} || { | |
| echo "=== JReleaser failed, checking logs ===" | |
| find build/jreleaser -name "*.log" -exec cat {} \; || echo "No log files found" | |
| exit 1 | |
| } |