Skip to content

Commit

Permalink
Ensure gpg-agent is properly setup on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvincent committed Feb 12, 2024
1 parent 5c45092 commit 95f1361
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,23 @@ jobs:
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11

- name: Setup gpg-agent
# The default version of gpg installed on the runners is outdated and doesn't
# work as expected.
#
# This installed the latest gpg4win version.
#
# See original reference here https://github.com/orgs/community/discussions/24933
- name: Setup GnuPG [windows]
if: ${{ matrix.os == 'windows-latest' }}
run: |
$env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
choco install --yes gpg4win
echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH
- name: Show gpg-agent info
run: |
gpg-agent --daemon || true
gpg-connect-agent /bye
# The default version of openssh on windows server is quite old (8.1) and doesn't have
# all the necessary signing/verification commands available
Expand Down

0 comments on commit 95f1361

Please sign in to comment.