From d2fe413d8001c4f71f4226ca5e20ff7a4f515c5c Mon Sep 17 00:00:00 2001 From: nikololiahim Date: Wed, 15 Jun 2022 21:29:05 +0300 Subject: [PATCH] importing the private key --- .github/workflows/release.yml | 8 ++++++-- build.sbt | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98479dd..5b3f417 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,10 @@ jobs: with: distribution: 'temurin' java-version: '11' + - name: Import GPG Key + uses: crazy-max/ghaction-import-gpg@v4 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - name: Configure local git run: >- git config user.name "${{ secrets.GIT_USERNAME }}" && @@ -32,13 +36,13 @@ jobs: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} if: ${{ github.event.inputs.release_version != '' }} - run: sbt "preRelease ${{ github.event.inputs.release_version }} ${{ secrets.GPG_KEY_ID }}" + run: sbt "preRelease ${{ github.event.inputs.release_version }}" - name: Release new version env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} if: ${{ github.event.inputs.release_version == '' }} - run: sbt "preRelease next ${{ secrets.GPG_KEY_ID }}" + run: sbt "preRelease next" - name: Latest tag uses: actions-ecosystem/action-get-latest-tag@v1 id: latest-tag diff --git a/build.sbt b/build.sbt index 6fec9c5..3dd1e92 100644 --- a/build.sbt +++ b/build.sbt @@ -150,7 +150,7 @@ generateDescriptor := { commands += Command.args("preRelease", "") { (state, args) => args match { - case Seq(nextVersion, pgpKeyId) => + case Seq(nextVersion) => val newState = Project .extract(state) .appendWithSession( @@ -168,8 +168,7 @@ commands += Command.args("preRelease", "") { (state, args) => releaseStepCommand("sonatypeBundleRelease"), releaseStepTask(generateDescriptor), pushChanges, - ), - pgpSigningKey := Some(pgpKeyId) + ) ), state, )