From f604f22474915e4c506ec8447c6ffb3546eeee31 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 25 Jun 2026 12:36:15 -0700 Subject: [PATCH] Publish and tests workflows improvements (#85) * Run JUnit reporter without internet (offline) * Add repository locations to publish workflow * Change java-version matrix to LTS and current JDK versions --- .github/workflows/bld.yml | 24 ++++++++++++------------ .github/workflows/publish.yml | 35 ++++++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index ae22c74..ee31a91 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -90,20 +90,20 @@ jobs: strategy: matrix: - java-version: [ 17, 20, 21, 22, 23, 24, 25 ] + java-version: [17, 22, 24, 26] steps: - name: Checkout source repository uses: actions/checkout@v7 with: clean: true - submodules: 'true' + submodules: "true" fetch-depth: 0 - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v5 with: - distribution: 'corretto' + distribution: "corretto" java-version: ${{ matrix.java-version }} check-latest: true @@ -128,27 +128,27 @@ jobs: - name: Run reporter if: always() && steps.tests.outcome == 'failure' - run: ./bld reporter --all + run: ./bld --offline reporter --all build-macos: runs-on: macos-latest strategy: matrix: - java-version: [ 17, 20, 21, 22, 23, 24, 25 ] + java-version: [17, 20, 21, 22, 23, 24, 25] steps: - name: Checkout source repository uses: actions/checkout@v7 with: clean: true - submodules: 'true' + submodules: "true" fetch-depth: 0 - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v5 with: - distribution: 'corretto' + distribution: "corretto" java-version: ${{ matrix.java-version }} check-latest: true @@ -169,14 +169,14 @@ jobs: - name: Run reporter if: always() && steps.tests.outcome == 'failure' - run: ./bld reporter --all + run: ./bld --offline reporter --all build-windows: runs-on: windows-latest strategy: matrix: - java-version: [ 17, 20, 21, 22, 23, 24, 25 ] + java-version: [17, 20, 21, 22, 23, 24, 25] steps: - name: Configure git line endings @@ -186,13 +186,13 @@ jobs: uses: actions/checkout@v7 with: clean: true - submodules: 'true' + submodules: "true" fetch-depth: 0 - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v5 with: - distribution: 'corretto' + distribution: "corretto" java-version: ${{ matrix.java-version }} check-latest: true @@ -213,4 +213,4 @@ jobs: - name: Run reporter if: always() && steps.tests.outcome == 'failure' - run: .\bld.bat reporter --all + run: .\bld.bat --offline reporter --all diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e2044d3..566ad8d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: - build-bld-project: + publish-bld-project: runs-on: ubuntu-latest steps: @@ -37,15 +37,32 @@ jobs: - name: Import key run: echo "${{ secrets.SIGN_SECRET_KEY }}" | gpg --batch --import + - name: Compile source + run: ./bld clean compile + + - name: Run tests + id: tests + run: ./bld test + + - name: Run reporter + if: always() && steps.tests.outcome == 'failure' + run: ./bld --offline reporter --all + - name: Publish run: >- - ./bld compile test publish - -Drife2Username=${{ secrets.RIFE2_USERNAME }} - -Drife2Password=${{ secrets.RIFE2_PASSWORD }} - -DsonatypeUser=${{ secrets.SONATYPE_USER }} - -DsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} - -DsignKey=${{ secrets.SIGN_KEY }} - -DsignPassphrase=${{ secrets.SIGN_PASSPHRASE }} + ./bld publish + -Dbld.repo.github=https://maven.pkg.github.com/rife2/bld + -Dbld.repo.github.username=${{ secrets.GH_USERNAME }} + -Dbld.repo.github.password=${{ secrets.GH_PASSWORD }} + -Dbld.repo.rife2-snapshots=https://repo.rife2.com/snapshots/ + -Dbld.repo.rife2-snapshots.username=${{ secrets.RIFE2_USERNAME }} + -Dbld.repo.rife2-snapshots.password=${{ secrets.RIFE2_PASSWORD }} + -Dbld.repo.central-snapshots=https://central.sonatype.com/repository/maven-snapshots/ + -Dbld.repo.central-snapshots.username=${{ secrets.SONATYPE_USER }} + -Dbld.repo.central-snapshots.password=${{ secrets.SONATYPE_PASSWORD }} + -Dsign.key=${{ secrets.SIGN_KEY }} + -Dsign.passphrase=${{ secrets.SIGN_PASSPHRASE }} - name: Delete GnuPG data - run: rm -rfv $HOME/.gnupg + if: always() + run: rm -rfv $HOME/.gnupg \ No newline at end of file