Skip to content

Commit d2fe413

Browse files
committed
importing the private key
1 parent bc83b2b commit d2fe413

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ jobs:
2323
with:
2424
distribution: 'temurin'
2525
java-version: '11'
26+
- name: Import GPG Key
27+
uses: crazy-max/ghaction-import-gpg@v4
28+
with:
29+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
2630
- name: Configure local git
2731
run: >-
2832
git config user.name "${{ secrets.GIT_USERNAME }}" &&
@@ -32,13 +36,13 @@ jobs:
3236
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3337
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
3438
if: ${{ github.event.inputs.release_version != '' }}
35-
run: sbt "preRelease ${{ github.event.inputs.release_version }} ${{ secrets.GPG_KEY_ID }}"
39+
run: sbt "preRelease ${{ github.event.inputs.release_version }}"
3640
- name: Release new version
3741
env:
3842
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3943
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
4044
if: ${{ github.event.inputs.release_version == '' }}
41-
run: sbt "preRelease next ${{ secrets.GPG_KEY_ID }}"
45+
run: sbt "preRelease next"
4246
- name: Latest tag
4347
uses: actions-ecosystem/action-get-latest-tag@v1
4448
id: latest-tag

build.sbt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ generateDescriptor := {
150150

151151
commands += Command.args("preRelease", "<arg>") { (state, args) =>
152152
args match {
153-
case Seq(nextVersion, pgpKeyId) =>
153+
case Seq(nextVersion) =>
154154
val newState = Project
155155
.extract(state)
156156
.appendWithSession(
@@ -168,8 +168,7 @@ commands += Command.args("preRelease", "<arg>") { (state, args) =>
168168
releaseStepCommand("sonatypeBundleRelease"),
169169
releaseStepTask(generateDescriptor),
170170
pushChanges,
171-
),
172-
pgpSigningKey := Some(pgpKeyId)
171+
)
173172
),
174173
state,
175174
)

0 commit comments

Comments
 (0)