Skip to content

Commit

Permalink
update mvn publish (#64)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicklas Körtge <[email protected]>
  • Loading branch information
n1ckl0sk0rtge authored Jul 18, 2024
1 parent fffc66b commit e605fcb
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ on:
types: [created]

jobs:
build:

build-java-17:
runs-on: ubuntu-latest
env:
SONAR_JRE: '17'
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
Expand All @@ -26,3 +26,26 @@ jobs:
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ github.token }}

build-java-11:
runs-on: ubuntu-latest
env:
SONAR_JRE: '11'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Deploy to GitHub Packages
run: |
export MVN_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
mvn versions:set -DnewVersion=$MVN_VERSION-jre11
mvn versions:commit
mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit e605fcb

Please sign in to comment.