Skip to content

Commit

Permalink
Fix jar signing (#5223)
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones authored Feb 1, 2024
1 parent e4a5a12 commit 9c11122
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,23 @@ jobs:
tar xf targets.tar
rm targets.tar
- name: Import signing key
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: echo $PGP_SECRET | base64 -d -i - | gpg --import

- name: Import signing key and strip passphrase
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != ''
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: |
echo "$PGP_SECRET" | base64 -d -i - > /tmp/signing-key.gpg
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1)
- name: Package repl
run: sbt scio-repl/assembly

Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -263,20 +263,20 @@ val skipUnauthorizedGcpGithubWorkflow = Def.setting {

ThisBuild / githubWorkflowTargetBranches := Seq("main")
ThisBuild / githubWorkflowJavaVersions := Seq(javaDefault, java17, java21) // default MUST be head
ThisBuild / githubWorkflowBuildPreamble := Seq(githubWorkflowGcpAuthStep, githubWorkflowSetupStep)
ThisBuild / githubWorkflowBuildPostamble := Seq(
ThisBuild / githubWorkflowBuildPreamble ++= Seq(githubWorkflowGcpAuthStep, githubWorkflowSetupStep)
ThisBuild / githubWorkflowBuildPostamble ++= Seq(
WorkflowStep.Sbt(
List("undeclaredCompileDependenciesTest", "unusedCompileDependenciesTest"),
name = Some("Check dependencies")
)
)
ThisBuild / githubWorkflowPublishPreamble := Seq(
ThisBuild / githubWorkflowPublishPreamble ++= Seq(
WorkflowStep.Sbt(
List("scio-repl/assembly"),
name = Some("Package repl")
)
)
ThisBuild / githubWorkflowPublishPostamble := Seq(
ThisBuild / githubWorkflowPublishPostamble ++= Seq(
WorkflowStep.Use(
UseRef.Public("softprops", "action-gh-release", "v1"),
Map(
Expand Down

0 comments on commit 9c11122

Please sign in to comment.