From 6d70c1953c37b023409e3af8d8b690a3723f2df6 Mon Sep 17 00:00:00 2001 From: mipo256 Date: Fri, 18 Jul 2025 15:28:11 +0300 Subject: [PATCH] Added gpg sigin key and passphrase --- .github/workflows/pr-build.yml | 24 +++++++++++++++++++ .../workflows/{workflow.yml => release.yml} | 8 ++++--- .gitignore | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pr-build.yml rename .github/workflows/{workflow.yml => release.yml} (80%) diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml new file mode 100644 index 0000000..caecbb9 --- /dev/null +++ b/.github/workflows/pr-build.yml @@ -0,0 +1,24 @@ +name: Pull Request Build + +run-name: PR Build - ${{ github.event.pull_request.title }} + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build with Tests + run: mvn -B clean test diff --git a/.github/workflows/workflow.yml b/.github/workflows/release.yml similarity index 80% rename from .github/workflows/workflow.yml rename to .github/workflows/release.yml index e855a42..e6b4511 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,10 @@ -name: Maven Central deploy +name: Maven Central Deploy + +run-name: Maven Central Deploy - ${{ github.ref_name }} on: release: types: [created] - pull_request: jobs: build: @@ -20,9 +21,10 @@ jobs: with: java-version: '17' distribution: 'temurin' - server-id: maven-central-release settings-path: ${{ github.workspace }} + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} - name: Build with Tests run: mvn -B clean install diff --git a/.gitignore b/.gitignore index 21113c6..44d6bd6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Compiled class file *.class +.secrets .idea target/