Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deploy2 #15

Merged
merged 2 commits into from
Dec 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 20 additions & 13 deletions .github/workflows/maven_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,29 @@ jobs:
with:
ref: 'main'
fetch-depth: 0

- name: Install gpg secret key
run: |
mkdir -p ~/.gnupg/private-keys-v1.d
chmod 700 ~/.gnupg/private-keys-v1.d
echo -n ${{ secrets.OSSRH_GPG_SECRET_KEY }} | base64 --decode | gpg --import

- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN

- name: Release Maven package
uses: samuelmeuli/action-maven-publish@v1
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg_passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USERNAME }}
nexus_password: ${{ secrets.OSSRH_TOKEN }}
- name: Install gpg secret key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --import
gpg --list-secret-keys --keyid-format LONG

- name: Publish to Maven Central repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
run: |
cat ~/.m2/settings.xml
echo $MAVEN_USERNAME
echo $MAVEN_PASSWORD
mvn \
--no-transfer-progress \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_PASSPHRASE }} \
clean deploy
Loading