Skip to content

Commit

Permalink
chore: define username/pass in m2-settings.xml to use with ossrh (#21)
Browse files Browse the repository at this point in the history
* chore: define username/pass in m2-settings.xml to use with ossrh

* ci: drop an env var that _probably_ isn't needed
  • Loading branch information
nicklasl authored Sep 25, 2023
1 parent 93642fa commit 5de1a72
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
distribution: 'zulu'
java-version: 17
server-id: ossrh
server-username: MAVEN_USERNAME # username for Sonatype JIRA login
server-password: MAVEN_PASSWORD # password for Sonatype JIRA login
server-username: ${{ secrets.OSSRH_USERNAME }} # username for Sonatype JIRA login
server-password: ${{ secrets.OSSRH_TOKEN }} # password for Sonatype JIRA login
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Full private key blob
gpg-passphrase: SIGN_KEY_PASSWORD # Password chosen when creating the GPG key
gpg-passphrase: ${{ secrets.SIGN_KEY_PASS }} # Password chosen when creating the GPG key

- name: Cache Maven packages
uses: actions/cache@v3.3.1
Expand All @@ -54,8 +54,8 @@ jobs:
- name: Deploy with Maven
run: |
mvn --batch-mode \
--settings release/m2-settings.xml \
clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY_PASSWORD: ${{ secrets.SIGN_KEY_PASS }}
9 changes: 9 additions & 0 deletions release/m2-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<settings>
<servers>
<server>
<id>ossrh</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>

0 comments on commit 5de1a72

Please sign in to comment.