test #43
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
container: | |
image: cimg/openjdk:11.0.22 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Import gpg key | |
run: | | |
echo ${{ secrets.GPG_BASE64_KEY }} | base64 -d > ./private.key | |
gpg --import --passphrase ${{ secrets.GPG_PASSPHRASE }} --batch --yes ./private.key | |
rm -f ./private.key | |
# - name: Copy settings.xml | |
# run: | | |
# pwd | |
# echo ${{ github.workspace }} | |
# mkdir ~/.m2 | |
# ls -l . | |
# cp m2/settings.xml ~/.m2/settings.xml | |
# cat ~/.m2/settings.xml | |
- name: Deploy | |
run: | | |
mvn --settings m2/settings.xml help:effective-settings | |
# mvn --settings m2/settings.xml deploy | |
env: | |
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} | |
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
- name: Save artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: central-bundle | |
path: ${{ github.workspace }}/target/central-publishing/central-bundle.zip | |