Skip to content

Commit

Permalink
Using gpg-agent requires less configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
purejava committed Jan 19, 2025
1 parent a95a0f6 commit d4e2ebf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build_and_release_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,13 @@ jobs:

- name: Setup GPG key information
run: |
mkdir -p ~/.gradle ~/.gnupg
echo "signing.gnupg.homeDir=/home/runner/.gnupg" >> ~/.gradle/gradle.properties
echo "signing.gnupg.executable=gpg" >> ~/.gradle/gradle.properties
echo "signing.gnupg.keyName=ABC48776" >> ~/.gradle/gradle.properties
mkdir -p ~/.gradle
echo "signing.gnupg.passphrase=${GPG_SIGNING_KEY_PW}" >> ~/.gradle/gradle.properties
env:
GPG_SIGNING_KEY_PW: ${{ secrets.GPG_PASSPHRASE }}

- name: Build package
run: ./gradlew clean build
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Release package
run: ./gradlew githubRelease
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/build_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ jobs:

- name: Setup GPG key information
run: |
mkdir -p ~/.gradle ~/.gnupg
echo "signing.gnupg.homeDir=/home/runner/.gnupg" >> ~/.gradle/gradle.properties
echo "signing.gnupg.executable=gpg" >> ~/.gradle/gradle.properties
echo "signing.gnupg.keyName=ABC48776" >> ~/.gradle/gradle.properties
mkdir -p ~/.gradle
echo "signing.gnupg.passphrase=${GPG_SIGNING_KEY_PW}" >> ~/.gradle/gradle.properties
env:
GPG_SIGNING_KEY_PW: ${{ secrets.GPG_PASSPHRASE }}

- name: Build package
run: ./gradlew clean build
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
5 changes: 0 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@
org.gradle.configuration-cache=false
org.gradle.parallel=true
org.gradle.caching=true

signing.gnupg.executable=/usr/local/bin/gpg
signing.gnupg.homeDir=/Users/ralph/.gnupg
signing.gnupg.keyName=ABC48776
signing.gnupg.passphrase=

0 comments on commit d4e2ebf

Please sign in to comment.