Skip to content

Commit 0327564

Browse files
committed
Move GPG key import above after cache step
1 parent d1d5d4c commit 0327564

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
path: |
4646
~/.konan
4747
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
48+
- name: Import GPG key
49+
uses: crazy-max/ghaction-import-gpg@v6
50+
if: success() && endsWith(env.VERSION_NAME, '-SNAPSHOT')
51+
with:
52+
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
53+
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
4854
- name: Set up JDK 21
4955
uses: actions/setup-java@v4
5056
with:
@@ -60,12 +66,6 @@ jobs:
6066
arguments: ${{ matrix.target }}
6167
- name: Retrieve Version
6268
run: echo "VERSION_NAME=$(./gradlew -q --no-configuration-cache printVersionName)" >> $GITHUB_ENV
63-
- name: Import GPG key
64-
uses: crazy-max/ghaction-import-gpg@v6
65-
if: success() && endsWith(env.VERSION_NAME, '-SNAPSHOT')
66-
with:
67-
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
68-
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
6969
- name: Upload Snapshot
7070
uses: gradle/actions/setup-gradle@v3
7171
if: success() && endsWith(env.VERSION_NAME, '-SNAPSHOT')

0 commit comments

Comments
 (0)