Move deploy.sh commands into sonatype-deploy.yml
This commit is contained in:
parent
ad81c90a47
commit
c6c3decc47
2 changed files with 15 additions and 34 deletions
33
.github/deploy.sh
vendored
33
.github/deploy.sh
vendored
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Decrypts the signing key in .github/codesigning.asc.enc
|
||||
# Imports that key
|
||||
# Uses .github/settings.xml and the release profile to deploy
|
||||
|
||||
echo "deploy.sh: Starting..."
|
||||
|
||||
(
|
||||
cd .github
|
||||
|
||||
echo "Retrieving GPG Private KEY"
|
||||
gpg --quiet \
|
||||
--batch \
|
||||
--yes \
|
||||
--decrypt \
|
||||
--passphrase="${GPG_PASSPHRASE}" \
|
||||
--output codesigning.asc \
|
||||
codesigning.asc.gpg
|
||||
|
||||
echo "Loading signing key"
|
||||
gpg --batch \
|
||||
--fast-import codesigning.asc
|
||||
)
|
||||
|
||||
echo "Releasing..."
|
||||
mvn --settings .github/settings.xml \
|
||||
-Dskip-Tests=true \
|
||||
-P release \
|
||||
-B \
|
||||
deploy
|
||||
|
||||
echo "deploy.sh: Done."
|
16
.github/workflows/sonatype-deploy.yml
vendored
16
.github/workflows/sonatype-deploy.yml
vendored
|
@ -16,7 +16,21 @@ jobs:
|
|||
- name: Build with Maven
|
||||
run: mvn -B install
|
||||
- name: Nexus Repo Publish
|
||||
run: sh .github/deploy.sh
|
||||
run: |
|
||||
gpg --quiet \
|
||||
--batch \
|
||||
--yes \
|
||||
--decrypt \
|
||||
--passphrase="${{ secrets.GPG_PASSPHRASE }}" \
|
||||
--output codesigning.asc \
|
||||
.github/codesigning.asc.gpg
|
||||
gpg --batch \
|
||||
--fast-import codesigning.asc
|
||||
mvn --settings .github/settings.xml \
|
||||
-Dskip-Tests=true \
|
||||
-P release \
|
||||
-B \
|
||||
deploy
|
||||
env:
|
||||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
||||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||
|
|
Loading…
Reference in a new issue