From e0185923197b024c4698fb0cecea9178d7a687ba Mon Sep 17 00:00:00 2001 From: Nullicorn Date: Sun, 30 Jan 2022 15:25:59 -0500 Subject: [PATCH] Add GPG key installation to publishing action Signed-off-by: Nullicorn --- .github/workflows/maven-publish.yml | 21 +++++++++++++++------ pom.xml | 14 +++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index e4c69fd..471c382 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,13 +1,13 @@ -name: Publish package to the Maven Central Repository and GitHub Packages +name: Publish package to the Maven Central Repository on: release: - types: [created] + types: [ created ] jobs: publish: - runs-on: ubuntu-latest - permissions: + runs-on: ubuntu-latest + permissions: contents: read - packages: write + packages: write steps: - uses: actions/checkout@v2 - name: Set up Java for publishing to Maven Central Repository @@ -18,8 +18,17 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + + - name: Install GPG secret key + id: install-secret-key + run: cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import + - name: Publish to the Maven Central Repository - run: mvn --batch-mode deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + run: mvn \ + --no-transfer-progress \ + --batch-mode \ + -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \ + clean deploy \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8a7fb5e..858024f 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,13 @@ https://github.com/TheNullicorn/Nedit/tree/master + + UTF-8 + UTF-8 + 1.8 + 1.8 + + sonatype-nexus-snapshots @@ -61,13 +68,6 @@ - - UTF-8 - UTF-8 - 1.8 - 1.8 - -