From 036ff2c809907d25c4968086428a3a5cadf82b36 Mon Sep 17 00:00:00 2001 From: rikkarth Date: Fri, 8 Dec 2023 18:23:03 +0000 Subject: [PATCH 1/3] maven.yml Update --- .github/workflows/maven.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3ff3f58..2bc5ef3 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -54,7 +54,7 @@ jobs: git tag -a "$VERSION" -m "Release $VERSION" git push origin "$VERSION" - publish: + publish-nexus: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest permissions: @@ -75,6 +75,14 @@ jobs: gpg_passphrase: ${{ secrets.gpg_passphrase }} nexus_username: ${{ secrets.nexus_username }} nexus_password: ${{ secrets.nexus_password }} + + publish-github: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - uses: actions/checkout@v4 - name: Set up Java for publishing to GitHub Packages uses: actions/setup-java@v3 with: From a3580059f3a4fae1997fb5cb9328d3d019b8827f Mon Sep 17 00:00:00 2001 From: rikkarth Date: Fri, 8 Dec 2023 18:33:57 +0000 Subject: [PATCH 2/3] maven.yml Update --- .github/workflows/maven.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2bc5ef3..75f42e1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -48,6 +48,8 @@ jobs: git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" git config --global user.name "${GITHUB_ACTOR}" - name: Create Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) echo "Creating release for version $VERSION" From 51d2bebb59a3908ae1c6be85012f098a4395ab9f Mon Sep 17 00:00:00 2001 From: rikkarth Date: Fri, 8 Dec 2023 18:35:49 +0000 Subject: [PATCH 3/3] maven.yml Update --- .github/workflows/maven.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 75f42e1..2354e98 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -79,6 +79,7 @@ jobs: nexus_password: ${{ secrets.nexus_password }} publish-github: + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest permissions: contents: write @@ -91,6 +92,10 @@ jobs: java-version: '8' distribution: 'corretto' - name: Publish to GitHub Packages - run: mvn --batch-mode deploy -Pgithub + with: + gpg_private_key: ${{ secrets.gpg_private_key }} + gpg_passphrase: ${{ secrets.gpg_passphrase }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: mvn --batch-mode deploy -Pgithub +