Skip to content

Commit

Permalink
chore: add CI for build verfication on multiple java versions
Browse files Browse the repository at this point in the history
  • Loading branch information
h-beeen committed Nov 11, 2024
1 parent 7202f5b commit 1aa0821
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build Verification

on:
push:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [17, 21, 23]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with JDK ${{ matrix.java-version }}
run: ./gradlew build
10 changes: 6 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Publish to Maven Central Repository

on:
push:
branches:
- master
workflow_run:
workflows: ["Verify"]
types:
- completed

jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/master' }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -52,4 +54,4 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
run: |
./gradlew publishAllPublicationsToMavenCentralRepository --stacktrace --debug
./gradlew publishAllPublicationsToMavenCentralRepository --stacktrace --debug

0 comments on commit 1aa0821

Please sign in to comment.