Skip to content

Commit

Permalink
upgrade maven compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
apulbere committed Jan 28, 2024
1 parent 6241000 commit cfcef82
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 29 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ jobs:
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy
run: mvn --batch-mode deploy -Ppublish-ossrh
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Set up Java for publishing to GitHub Packages
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Publish to GitHub Packages
run: mvn --batch-mode deploy
run: mvn --batch-mode deploy -Ppublish-github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
78 changes: 54 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,31 +78,61 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.2.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>sonatype-central</publishingServerId>
<tokenEnabled>true</tokenEnabled>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>publish-ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.2.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>ossrh</publishingServerId>
<tokenEnabled>true</tokenEnabled>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>

<profile>
<id>publish-github</id>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/apulbere/crop</url>
</repository>
</distributionManagement>
</profile>
</profiles>

</project>

0 comments on commit cfcef82

Please sign in to comment.