Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dschiese committed Feb 27, 2024
1 parent 0f3221c commit c4df196
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 37 deletions.
47 changes: 11 additions & 36 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Check out repo
uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: Set up Maven Central Repository
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
server-id: oosrh

- name: Configure Git author
run: |
git config --local user.email "[email protected]"
git config --local user.name "dschiese"
- name: Import GPG Key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Release With Maven
run: |
mvn -B -U \
release:prepare \
release:perform \
javadoc:jar \
source:jar \
-s settings.xml \
-Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \
deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
server-id: ossrh
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_PASSWORD }}
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

- name: Build and Deploy
run: mvn clean deploy --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
<autoReleaseAfterClose>${env.AUTO_RELEASE_AFTER_CLOSE}</autoReleaseAfterClose>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<!-- Signing the artifact -->
Expand Down

0 comments on commit c4df196

Please sign in to comment.