Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff-Glatz committed Mar 28, 2022
1 parent d573f45 commit 991cb3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
- name: Install maven settings-security.xml
run: printenv SETTINGS_SECURITY_XML > ~/.m2/settings-security.xml
run: deploy/setup-security.sh
env:
SETTINGS_SECURITY_XML: ${{secrets.SETTINGS_SECURITY_XML}}
- name: Deploy to snapshot Maven Central
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
- name: Install maven settings-security.xml
run: printenv SETTINGS_SECURITY_XML > ~/.m2/settings-security.xml
run: deploy/setup-security.sh
env:
SETTINGS_SECURITY_XML: ${{secrets.SETTINGS_SECURITY_XML}}
- name: Deploy release to Maven Central
Expand Down
10 changes: 3 additions & 7 deletions deploy/setup-security.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#!/bin/bash -e

# Setup maven settings-security.xml for nexus staging
echo "Installing ~/.m2/settings-security.xml"
printenv SETTINGS_SECURITY_XML > ~/.m2/settings-security.xml

# Setup the code signing key; it will be used to publish snapshots and releases
printenv CODE_SIGNING_KEY > /tmp/code-signing-key.asc
gpg --batch --no-default-keyring --allow-secret-key-import --import /tmp/code-signing-key.asc
rm /tmp/code-signing-key.asc
echo "Installing ${HOME}/.m2/settings-security.xml"
printenv SETTINGS_SECURITY_XML > "${HOME}/.m2/settings-security.xml"
# -Dsettings.security=%path.to.maven.security%

0 comments on commit 991cb3e

Please sign in to comment.