Skip to content

Commit d0c2f7e

Browse files
committed
fix: gpg key testing
1 parent 0179fd1 commit d0c2f7e

3 files changed

Lines changed: 34 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ jobs:
8787
echo "CHANNEL=$CHANNEL" >> $GITHUB_OUTPUT
8888
echo "VERSION=$FINAL_VERSION" >> $GITHUB_OUTPUT
8989
90-
- name: Import GPG key
91-
if: steps.version.outputs.CHANNEL == 'release'
92-
run: |
93-
# Setup GPG
94-
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
95-
gpg --list-secret-keys --keyid-format LONG
96-
# Configure GPG
97-
mkdir -p ~/.gnupg
98-
chmod 700 ~/.gnupg
99-
echo "use-agent" > ~/.gnupg/gpg.conf
100-
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
101-
echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
102-
gpg-connect-agent reloadagent /bye
90+
# - name: Import GPG key
91+
# if: steps.version.outputs.CHANNEL == 'release'
92+
# run: |
93+
# # Setup GPG
94+
# echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
95+
# gpg --list-secret-keys --keyid-format LONG
96+
# # Configure GPG
97+
# mkdir -p ~/.gnupg
98+
# chmod 700 ~/.gnupg
99+
# echo "use-agent" > ~/.gnupg/gpg.conf
100+
# echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
101+
# echo "allow-loopback-pinentry" > ~/.gnupg/gpg-agent.conf
102+
# gpg-connect-agent reloadagent /bye
103103

104104
- name: Build with Gradle
105105
run: |
@@ -128,6 +128,8 @@ jobs:
128128
COMMIT_HASH: ${{ env.COMMIT_HASH }}
129129
SIMPLECLOUD_USERNAME: ${{ secrets.SIMPLECLOUD_USERNAME }}
130130
SIMPLECLOUD_PASSWORD: ${{ secrets.SIMPLECLOUD_PASSWORD }}
131+
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
132+
ORG_GRADLE_PROJECT_signingPassphrase: ${{ secrets.GPG_PASSPHRASE }}
131133

132134
- name: Prepare Artifacts
133135
run: |

.idea/workspace.xml

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,13 @@ subprojects {
152152
return@signing
153153
}
154154

155-
useGpgCmd()
156-
sign(publishing.publications)
155+
if (hasProperty("signingPassphrase")) {
156+
val signingKey: String? by project
157+
val signingPassphrase: String? by project
158+
useInMemoryPgpKeys(signingKey, signingPassphrase)
159+
sign(publishing.publications)
160+
}
161+
// useGpgCmd()
162+
// sign(publishing.publications)
157163
}
158164
}

0 commit comments

Comments
 (0)