Skip to content

Commit ba03aab

Browse files
committed
TEST : Sign driver in CI
1 parent e179119 commit ba03aab

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

.github/workflows/build.yml

+50-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ jobs:
3131
- name: Get Sources
3232
uses: actions/checkout@v3
3333

34-
- uses: ilammy/msvc-dev-cmd@v1
34+
- name: Setup shell
35+
uses: ilammy/msvc-dev-cmd@v1
3536
with:
3637
arch: ${{ matrix.shell_arch }}
3738

@@ -73,3 +74,51 @@ jobs:
7374
with:
7475
name: btrfs-pdb
7576
path: upload-pdb/*
77+
78+
sign:
79+
needs: build
80+
runs-on: windows-latest
81+
name: Sign
82+
83+
env:
84+
INF2CAT_PROGRAM: 'C:/Program Files (x86)/Windows Kits/10/bin/x86/Inf2Cat.exe'
85+
86+
steps:
87+
- name: Get Sources
88+
uses: actions/checkout@v3
89+
90+
- name: Setup shell
91+
uses: ilammy/msvc-dev-cmd@v1
92+
with:
93+
arch: x86
94+
95+
- uses: actions/download-artifact@v3
96+
with:
97+
name: btrfs
98+
path: upload
99+
100+
- name: Import key
101+
run: |
102+
# Create the PFX file from the base64-encoded secret
103+
"${{ secrets.PFX_FILE_B64 }}" | Out-File -FilePath pfx.b64
104+
CertUtil -decode pfx.b64 cert.pfx
105+
# Import it
106+
$plaintextpwd = "password"
107+
$pwd = ConvertTo-SecureString -String $plaintextpwd -Force -AsPlainText
108+
Import-PfxCertificate -FilePath ./cert.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $pwd
109+
110+
- name: Create catalog file
111+
run: |
112+
cd upload
113+
& "${{env.INF2CAT_PROGRAM}}" /os:10_NI_X64 /driver:.
114+
115+
- name: Sign catalog file
116+
run: |
117+
cd upload
118+
SignTool sign /fd SHA256 /v /s My /n "Btrfs driver" /t http://timestamp.digicert.com btrfs.cat
119+
120+
- name: Upload driver
121+
uses: actions/upload-artifact@v3
122+
with:
123+
name: btrfs
124+
path: upload/*

0 commit comments

Comments
 (0)