Skip to content

Commit a9ed168

Browse files
committed
ci: move gpg import into publish artifact step
1 parent 42a55df commit a9ed168

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/publish-release.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,10 @@ jobs:
3737
restore-keys: |
3838
${{ runner.os }}-gradle-wrapper-
3939
40-
- name: Import gpg key
41-
env:
42-
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
43-
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
44-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
45-
run:
46-
export GPG_TTY=$(tty) && echo $GPG_KEY_BASE64 | base64 --decode | gpg --fast-import --batch
47-
4840
- name: Publish artifact
4941
env:
5042
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GPG_KEY_BASE64: ${{ secrets.GPG_KEY_BASE64 }}
5144
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
5245
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
5346
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
@@ -56,6 +49,7 @@ jobs:
5649
# The GITHUB_REF tag comes in the format 'refs/tags/xxx'.
5750
# So if we split on '/' and take the 3rd value, we can get the release name.
5851
run: |
52+
export GPG_TTY=$(tty) && echo ${GPG_KEY_BASE64} | base64 --decode | gpg --fast-import --batch
5953
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
6054
echo "New version: ${NEW_VERSION}"
6155
./gradlew -Pversion=${NEW_VERSION} publish

0 commit comments

Comments
 (0)