Spring Boot JPA Nested Set v0.1.1 #41
Workflow file for this run
This file contains hidden or 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: Release to Maven Central | |
on: | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Import GPG key | |
run: | | |
echo "$GPG_PRIVATE_KEY" | base64 --decode | gpg --batch --yes --import | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
- name: Set up gpg-agent | |
run: | | |
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
echo RELOADAGENT | gpg-connect-agent | |
echo -e "pinentry-mode loopback\n" >> ~/.gnupg/gpg.conf | |
- name: Set up Maven Central settings | |
run: | | |
mkdir -p ~/.m2 | |
cat <<EOF > ~/.m2/settings.xml | |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<servers> | |
<server> | |
<id>central</id> | |
<username>${{ secrets.MAVEN_CENTRAL_USERNAME }}</username> | |
<password>${{ secrets.MAVEN_CENTRAL_TOKEN }}</password> | |
</server> | |
</servers> | |
</settings> | |
EOF | |
- name: Build with Maven | |
run: | | |
mvn clean deploy -Dgpg.passphrase=$GPG_PASSPHRASE \ | |
-Dgpg.keyname=$GPG_KEY_ID \ | |
-Dgpg.executable=gpg \ | |
-Dgpg.pinentry.mode=loopback | |
env: | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} |