Skip to content

chore: Release 0.1.5 #19

chore: Release 0.1.5

chore: Release 0.1.5 #19

Workflow file for this run

name: Perform release
env:
JAVA_VERSION: 17
on:
pull_request_target:
types:
- closed
branches:
- main
paths:
- .github/project.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
attestations: write
id-token: write
contents: write
discussions: write
defaults:
run:
shell: bash
jobs:
release:
runs-on: ubuntu-latest
# Verifies that the PR was merged into main, that the PR only runs in the docling-java repo (not a fork), and that the PR branch is NOT from a fork.
if: (github.event.pull_request.merged == true) && (github.repository == 'docling-project/docling-java') && (github.event.pull_request.head.repo.full_name == 'docling-project/docling-java')
steps:
- uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
id: app-token
with:
app-id: ${{ vars.DOCLING_JAVA_CI_APP_ID }}
private-key: ${{ secrets.DOCLING_JAVA_CI_PRIVATE_KEY }}
- name: Checkout before
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: ${{ github.event.pull_request.base.sha }}
path: before
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- name: Capture version before PR
run: echo "PREVIOUS_VERSION=$(yq '.release.current-version' before/.github/project.yml)" >> $GITHUB_ENV
- name: Checkout current ref
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
token: ${{ steps.app-token.outputs.token }}
path: after
fetch-depth: 0
- name: Capture current version
run: echo "CURRENT_VERSION=$(yq '.release.current-version' after/.github/project.yml)" >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Build artifacts
working-directory: before
run: ./gradlew --no-daemon -Pjava.version=${{ env.JAVA_VERSION }} publish
- name: Release
working-directory: before
env:
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
JRELEASER_MAVENCENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
JRELEASER_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.JRELEASER_GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.JRELEASER_GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }}
JRELEASER_DISCORD_WEBHOOK: ${{ secrets.RELEASES_DISCORD_WEBHOOK }}
JRELEASER_DRY_RUN: ${{ inputs.dryrun }}
run: |
echo "Releasing version ${{ env.PREVIOUS_VERSION }} -> ${{ env.CURRENT_VERSION }}"
./gradlew --no-daemon :jreleaserFullRelease
# Persist logs
- name: JReleaser release output
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: jreleaser-release
path: |
before/build/jreleaser/trace.log
before/build/jreleaser/output.properties