diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 42b0587..3cd9b60 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -16,6 +16,28 @@ jobs: packages: write steps: + - id: install-secret-key + name: Install gpg secret key + run: | + cat <(echo -e "${{ secrets.ORG_GPG_PRIVATE_KEY }}") | gpg --batch --import + gpg --list-secret-keys --keyid-format LONG + - uses: actions/checkout@v4 + - name: Set up Java for publishing to Maven Central Snapshot Repository + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: 'maven' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-passphrase: PASSPHRASE + - name: Make a snapshot + run: mvn -Pdeploy -Pproduction --no-transfer-progress --batch-mode clean deploy -U + env: + MAVEN_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }} + PASSPHRASE: ${{ secrets.ORG_GPG_PASSPHRASE }} - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v4