diff --git a/.github/workflows/mvn-deploy-release.yaml b/.github/workflows/mvn-deploy-release.yaml new file mode 100644 index 0000000..6eaf4c8 --- /dev/null +++ b/.github/workflows/mvn-deploy-release.yaml @@ -0,0 +1,40 @@ +name: Logback Appender Maven CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + env: + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_KEY: ${{ secrets.GPG_KEY }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + MVN_MASTER_PASSWORD: ${{ secrets.MVN_MASTER_PASSWORD }} + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + - name: Install Java and Maven + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Create settings-security.xml + run: | + echo '' > ~/.m2/settings-security.xml + echo " ${{ secrets.MVN_MASTER_PASSWORD }}" >> ~/.m2/settings-security.xml + echo '' >> ~/.m2/settings-security.xml + - name: Release Maven package + uses: samuelmeuli/action-maven-publish@v1.4.0 + with: + maven_profiles: deploy + gpg_private_key: ${{ secrets.GPG_KEY }} + gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }} + nexus_username: ${{ secrets.OSSRH_USERNAME }} + nexus_password: ${{ secrets.OSSRH_PASSWORD }} + server_id: ossrh-nexus \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5d564ca..c9962b0 100644 --- a/pom.xml +++ b/pom.xml @@ -88,7 +88,15 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 1.6 + + + + --pinentry-mode + loopback + --no-tty + + sign-artifacts @@ -209,4 +217,4 @@ test - \ No newline at end of file + diff --git a/release/codesigning.asc.enc b/release/codesigning.asc.enc deleted file mode 100644 index cd3ace8..0000000 Binary files a/release/codesigning.asc.enc and /dev/null differ diff --git a/release/settings-security.xml b/release/settings-security.xml new file mode 100644 index 0000000..cd7e33d --- /dev/null +++ b/release/settings-security.xml @@ -0,0 +1,3 @@ + + ${env.MVN_MASTER_PASSWORD } + diff --git a/release/settings.xml b/release/settings.xml index b811627..9f0da13 100644 --- a/release/settings.xml +++ b/release/settings.xml @@ -1,23 +1,22 @@ - - - ossrh-nexus - ${env.OSSRH_USERNAME} - ${env.OSSRH_PASSWORD} - - - - - - ossrh-nexus - - true - - - gpg - ${env.GPG_KEY} - ${env.GPG_PASSPHRASE} - - - + + + ossrh-nexus + ${env.OSSRH_USERNAME} + ${env.OSSRH_PASSWORD} + + + + + ossrh-nexus + + true + + + gpg + ${env.GPG_KEY} + ${env.GPG_PASSPHRASE} + + + \ No newline at end of file