Skip to content

Commit e51c3d1

Browse files
committed
fix: code-sign Windows release executable to prevent firewall blocking
1 parent 88763ab commit e51c3d1

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ jobs:
102102
else
103103
cargo install cross --git https://github.com/rust-embedded/cross
104104
cross build --release --target x86_64-pc-windows-gnu
105+
sudo apt-get install osslsigncode
106+
echo "${{ secrets.WIN_SIGN_KEY }}" | base64 -d > code_sign.key.pem
107+
echo "${{ secrets.WIN_SIGN_CERT }}" | base64 -d > code_sign.cert.pem
108+
mkdir ./target/x86_64-pc-windows-gnu/signed
109+
osslsigncode sign \
110+
-certs code_sign.cert.pem \
111+
-key code_sign.key.pem \
112+
-n "VRC OSC Manager" \
113+
-i https://github.com/DASPRiD/vrc-osc-manager/ \
114+
-t http://timestamp.sectigo.com \
115+
-in ./target/x86_64-pc-windows-gnu/release/vrc-osc-manager.exe \
116+
-out ./target/x86_64-pc-windows-gnu/signed/vrc-osc-manager.exe
105117
fi
106118
shell: bash
107119

@@ -111,7 +123,7 @@ jobs:
111123
name: ${{ matrix.target }}-binary
112124
path: |
113125
./target/x86_64-unknown-linux-gnu/release/vrc-osc-manager
114-
./target/x86_64-pc-windows-gnu/release/vrc-osc-manager.exe
126+
./target/x86_64-pc-windows-gnu/signed/vrc-osc-manager.exe
115127
116128
semantic-release:
117129
needs: [ check-release, build ]

0 commit comments

Comments
 (0)