Skip to content

Commit

Permalink
Merge pull request #41 from hazendaz/develop
Browse files Browse the repository at this point in the history
Update GHA used jdks, prevent the sonatype deploy on forks or immediately after release, and adjust profiles
  • Loading branch information
hazendaz authored Oct 21, 2023
2 parents f58c84a + 4a26748 commit 99b5d5f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 18
java-version: 21
cache: maven

- name: Build with Maven
Expand All @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
java: [7, 8, 11, 18]
java: [7, 8, 11, 17, 21]

name: Java ${{ matrix.java }} Compatibility

Expand All @@ -54,7 +54,7 @@ jobs:
deploy:
name: Deploy to OSSRH
needs: [build, compatibility-checks]
if: github.event_name == 'push'
if: github.event_name == 'push' && github.repository_owner == 'acegi' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 18
java-version: 21
cache: maven

- name: Build with Maven
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ for full information.

Snapshot releases are available in the
[OSS Sonatype Snapshots Repository](https://oss.sonatype.org/content/repositories/snapshots/au/com/acegi/xml-format-maven-plugin).

## Releasing

Use jdk 17 or lower to perform release in order to keep java compatibility at java 7. This is necessary as usage of java 21 to build requires we set to java 8.
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<profile>
<id>additional-plugins-on-java-11-and-above</id>
<activation>
<jdk>[1.11</jdk>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
Expand All @@ -179,5 +179,16 @@
</plugins>
</build>
</profile>
<profile>
<id>additional-plugins-on-java-21-and-above</id>
<activation>
<jdk>[21,)</jdk>
</activation>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.enforcer.java>8</maven.enforcer.java>
</properties>
</profile>
</profiles>
</project>

0 comments on commit 99b5d5f

Please sign in to comment.