CI #19
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: Publish | |
| on: | |
| push: | |
| branches: [main, master] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Decode GPG Key | |
| run: | | |
| mkdir -p ~/.gradle/ | |
| echo "${{secrets.PGP_SECRET}}" | base64 --decode > ~/.gradle/secring.key | |
| gpg --batch --pinentry-mode=loopback --yes --passphrase ${{ secrets.PGP_PASSPHRASE }} --import ~/.gradle/secring.key | |
| gpg --batch --pinentry-mode=loopback --yes --passphrase ${{ secrets.PGP_PASSPHRASE }} --export-secret-key 01BA0C89CEC406826F7680A162D9B4F3D67419B7 > ~/.gradle/secring.gpg | |
| - name: Publish | |
| run: | | |
| ./gradlew publishToSonatype -Psigning.keyId=D67419B7 -Psigning.password=${{secrets.PGP_PASSPHRASE}} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) closeAndReleaseSonatypeStagingRepository --warn --stacktrace | |
| env: | |
| PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
| PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |