From daaab8cff0d1fe4f5cb704ea69e8b448f9b2e90a Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Sun, 5 Mar 2023 02:39:03 +0000 Subject: Test automated signing --- .github/workflows/gradle.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b451daa..d4165c6 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -28,13 +28,25 @@ jobs: with: java-version: '8' distribution: 'corretto' + - name: Add the release signing secret key + if: github.ref_name == 'main' + run: echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import + env: + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} - name: Build with Gradle uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 with: arguments: build + + - name: Sign the binary + if: github.ref_name == 'main' + run: gpg --detach-sign -a ./build/libs/*.jar + env: + GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} + - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.1 with: # Artifact name - path: ./build/libs/*.jar + path: ./build/libs/ -- cgit