Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,21 @@ on: [workflow_dispatch]
jobs:
deployment:
runs-on: ubuntu-latest
name: Deploy to Maven
environment: Deploy
name: PathExpression deployment
steps:
- name: Checkout source code
uses: actions/checkout@v4
# Sets up Java version
- name: Set up Java
uses: actions/setup-java@v4

- name: Deploy version
uses: secure-software-engineering/actions/deployment/maven-deployment@maven-central-deploy
with:
distribution: 'adopt'
java-package: 'jdk'
java-version: '8'
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin
server-username: OSSRH_USERNAME # Env var that holds your OSSRH user name
server-password: OSSRH_PASSWORD # Env var that holds your OSSRH user pw
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
- name: Build & Deploy PathExpression
run: mvn -B -U clean deploy -Pdeployment
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PW }}
java-distribution: adopt
java-version: 11
server-id: central
server-username: ${{ secrets.SONATYPE_USER }}
server-password: ${{ secrets.SONATYPE_PW }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
mvn-cli-args: '-DskipTests -Pdeployment'
deploy-mode: release
5 changes: 4 additions & 1 deletion .github/workflows/maven.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Java CI with Maven
name: Run Tests

on:
push:
branches:
- develop
- master
pull_request:

jobs:
Expand Down
35 changes: 13 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,19 @@
<id>deployment</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<deploymentName>${project.artifactId} ${project.version}</deploymentName>
<!-- Same id as in the deployment workflow -->
<publishingServerId>central</publishingServerId>
<waitUntil>published</waitUntil>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down Expand Up @@ -142,15 +144,4 @@
<version>2.25.1</version>
</dependency>
</dependencies>

<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>
</project>