File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,19 @@ jobs:
70
70
- name : Validate Gradle Wrapper
71
71
uses : gradle/actions/wrapper-validation@v3
72
72
73
- # This assumes the GPG key is stored as a base64-encoded string in the secret
73
+ # Decode the base64 encoded GPG key from secrets and save to temporary file
74
+ # Start multiline environment variable for GitHub Actions
75
+ # Add the decoded GPG key content to the environment variable
76
+ # End the multiline environment variable
77
+ # Clean up temporary file for security
74
78
- name : Set up GPG key
75
79
env :
76
80
GPG_KEY_CONTENTS : ${{ secrets.GPG_KEY_CONTENTS }}
77
81
run : |
78
- echo "$GPG_KEY_CONTENTS" | base64 -d > /tmp/gpg_key.asc
79
- echo "ORG_GRADLE_PROJECT_signingInMemoryKey=$(cat /tmp/gpg_key.asc)" >> $GITHUB_ENV
82
+ echo "$GPG_KEY_CONTENTS" | base64 -d > /tmp/gpg_key.asc
83
+ echo "ORG_GRADLE_PROJECT_signingInMemoryKey<<EOF" >> $GITHUB_ENV
84
+ cat /tmp/gpg_key.asc >> $GITHUB_ENV
85
+ echo "EOF" >> $GITHUB_ENV
80
86
rm /tmp/gpg_key.asc
81
87
82
88
- name : Cache Gradle and Konan
You can’t perform that action at this time.
0 commit comments