chore: check if can sign txt file #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sign test | |
on: | |
pull_request: | |
branches: [ main ] | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
sign: | |
runs-on: windows-2022 | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 'Google auth' | |
id: 'auth' | |
uses: 'google-github-actions/auth@v2' | |
with: | |
project_id: 'shinkai-412316' | |
workload_identity_provider: 'projects/511721742630/locations/global/workloadIdentityPools/github/attribute.repository/shinkai-apps' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
with: | |
project_id: 'shinkai-412316' | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Download Jsign | |
shell: bash | |
run: choco install jsign | |
- name: Cert to file | |
shell: bash | |
run: | | |
echo -n "$EV_CODE_SIGNING_CERTIFICATE" > OS20241029372986.cer | |
- name: Download file to sign | |
shell: bash | |
run: | | |
curl -LO https://download.shinkai.com/shinkai-desktop/binaries/production/x86_64-pc-windows-msvc/latest/Shinkai-Desktop-latest_x86_64-pc-windows-msvc.exe | |
- name: Sign | |
shell: bash | |
run: > | |
jsign \ | |
--storetype GOOGLECLOUD \ | |
--storepass "$(gcloud auth print-access-token)" \ | |
--keystore "projects/shinkai-412316/locations/us/keyRings/shinkai-apps" \ | |
--alias "EVCodeSigning" \ | |
--certfile "OS20241029372986.cer" \ | |
--tsmode RFC3161 \ | |
--tsaurl http://timestamp.globalsign.com/tsa/r6advanced1 \ | |
"Shinkai-Desktop-latest_x86_64-pc-windows-msvc.exe" |