File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -101,15 +101,11 @@ jobs:
101101 ~/Library/Caches/Coursier/v1
102102 key : ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
103103
104- - name : Export GPG_TTY
105- run : echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
106-
107104 - name : Import signing key
108- run : echo $PGP_SECRET | base64 -d | gpg --import
109-
110- - name : Hack pinentry to use PGP_PASSPHRASE
111105 env :
112106 PGP_PASSPHRASE : ${{ secrets.PGP_PASSPHRASE }}
113- run : echo "$PGP_PASSPHRASE" | gpg --batch --yes --passphrase-fd 0 build.sbt &> /dev/null
107+ run : |
108+ echo "$PGP_SECRET" | base64 -d > /tmp/signing-key.gpg
109+ echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
114110
115111 - run : sbt ++${{ matrix.scala }} release
Original file line number Diff line number Diff line change @@ -79,14 +79,13 @@ ThisBuild / spiewakMainBranches := Seq("main")
7979ThisBuild / githubWorkflowArtifactUpload := false
8080
8181// we can remove this once we have a non-password-protected key in the secrets
82- ThisBuild / githubWorkflowPublishPreamble :=
83- WorkflowStep .ComputeVar (" GPG_TTY" , " tty" ) +: (ThisBuild / githubWorkflowPublishPreamble).value
84-
85- ThisBuild / githubWorkflowPublishPreamble +=
82+ ThisBuild / githubWorkflowPublishPreamble := Seq (
8683 WorkflowStep .Run (
87- List (" echo \" $PGP_PASSPHRASE\" | gpg --batch --yes --passphrase-fd 0 build.sbt &> /dev/null" ),
88- name = Some (" Hack pinentry to use PGP_PASSPHRASE" ),
89- env = Map (" PGP_PASSPHRASE" -> " ${{ secrets.PGP_PASSPHRASE }}" ))
84+ List (
85+ " echo \" $PGP_SECRET\" | base64 -d > /tmp/signing-key.gpg" ,
86+ " echo \" $PGP_PASSPHRASE\" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg" ),
87+ name = Some (" Import signing key" ),
88+ env = Map (" PGP_PASSPHRASE" -> " ${{ secrets.PGP_PASSPHRASE }}" )))
9089
9190// environments
9291
You can’t perform that action at this time.
0 commit comments