Skip to content

Commit

Permalink
new windows signing approach
Browse files Browse the repository at this point in the history
  • Loading branch information
gulbanana committed Aug 28, 2024
1 parent 071a0e6 commit 1efa636
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,17 @@ jobs:
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: install certificate (windows)
- name: install signtool (windows)
if: matrix.platform == 'windows-latest'
shell: bash # env might not work with powershell
env:
WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
WINDOWS_SIGN_COMMAND: trusted-signing-cli -e ${{secrets.WINDOWS_SIGNING_ENDPOINT}} -a ${{secrets.WINDOWS_SIGNING_ACCOUNT}} -c ${{secrets.WINDOWS_SIGNING_PROFILE}} %1
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE
certutil -decode certificate/tempCert.txt certificate/certificate.pfx
Remove-Item -path certificate -include tempCert.txt
Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText)
cd "$GITHUB_WORKSPACE"
cat './src-tauri/tauri.conf.json' | jq '.bundle .windows += {"signCommand": env.WINDOWS_SIGN_COMMAND}' > './src-tauri/temp.json' && mv './src-tauri/temp.json' './src-tauri/tauri.conf.json'
cargo install [email protected]
- name: install frontend dependencies
run: npm install --package-lock=false

Expand All @@ -62,6 +60,9 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
AZURE_TENANT_ID: ${{ matrix.platform == 'windows-latest' && secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ matrix.platform == 'windows-latest' && secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ matrix.platform == 'windows-latest' && secrets.AZURE_CLIENT_SECRET }}
with:
args: ${{ matrix.platform == 'macos-latest' && '--target universal-apple-darwin' || ''}}
tagName: v__VERSION__
Expand Down

0 comments on commit 1efa636

Please sign in to comment.