Skip to content

Commit

Permalink
Maven publish.yml (#241)
Browse files Browse the repository at this point in the history
* Maven publish.yml
  • Loading branch information
olibye committed Mar 8, 2024
1 parent c3020ad commit f61736b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI with Maven
name: Maven Build

on:
push:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Maven deploy to Maven Central
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
server-id: ossrh
# used for signing the testjar
gpg-passphrase: secret
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Publish package
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
13 changes: 0 additions & 13 deletions settings.xml

This file was deleted.

1 change: 1 addition & 0 deletions testjar/gpg-agent.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow-loopback-pinentry
4 changes: 4 additions & 0 deletions testjar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
<homedir>${basedir}</homedir>
<passphrase>secret</passphrase>
<defaultKeyring>false</defaultKeyring>
<gpgArguments>
<gpgArgument>--pinentry-mode</gpgArgument>
<gpgArgument>loopback</gpgArgument>
</gpgArguments>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit f61736b

Please sign in to comment.