Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eltorio committed Apr 3, 2024
1 parent 883fc40 commit f4fab1e
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/flutter-sctg-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,25 +211,40 @@ jobs:
run: |
export MACOS_P12_BASE64="${{ secrets.MACOS_P12_BASE64 }}"
echo "$MACOS_P12_BASE64" | base64 --decode > certificate.pfx
ls -l certificate.pfx
export MACOS2_P12_BASE64="${{ secrets.MACOS2_P12_BASE64 }}"
echo "$MACOS2_P12_BASE64" | base64 --decode > certificate2.pfx
export MACOS3_P12_BASE64="${{ secrets.MACOS3_P12_BASE64 }}"
echo "$MACOS3_P12_BASE64" | base64 --decode > certificate3.pfx
ls -l certificate*.pfx
shell: bash


- name: Add certificate
continue-on-error: true
run: |
$pfxpath = '.\certificate.pfx'
$pfxpath2 = '.\certificate2.pfx'
$pfxpath3 = '.\certificate3.pfx'
$password = '${{ secrets.MACOS_P12_PASSWORD }}'
Import-PfxCertificate -FilePath $pfxpath -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString -String $password -Force -AsPlainText)
Import-PfxCertificate -FilePath $pfxpath2 -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString -String $password -Force -AsPlainText)
Import-PfxCertificate -FilePath $pfxpath3 -CertStoreLocation Cert:\LocalMachine\My -Password (ConvertTo-SecureString -String $password -Force -AsPlainText)
shell: pwsh

- name: Sign rustdesk files
run: |
echo "C:\Program Files (x86)\Windows Kits\10\bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
signtool sign /f ./certificate.pfx /p $env:MACOS_P12_PASSWORD ./rustdesk/*.exe
signtool sign /f ./certificate.pfx /p $env:MACOS_P12_PASSWORD ./rustdesk/*.dll
signtool sign /f ./certificate.pfx /p ${{ secrets.MACOS_P12_PASSWORD }} ./rustdesk/*.exe
signtool sign /f ./certificate.pfx /p ${{ secrets.MACOS_P12_PASSWORD }} ./rustdesk/*.dll
shell: powershell
continue-on-error: true

- name: Build self-extracted executable
shell: bash
if: env.UPLOAD_ARTIFACT == 'true'
run: |
ls -l ./rustdesk
pushd ./libs/portable
pip3 install -r requirements.txt
mv ../../rustdesk/rustdesk.exe ../../rustdesk/SCTGDesk.exe
ls -l ../../rustdesk
python3 ./generate.py -f ../../rustdesk/ -o . -e ../../rustdesk/SCTGDesk.exe
popd
mkdir -p ./SignOutput
Expand All @@ -238,8 +253,9 @@ jobs:
- name: Sign rustdesk self-extracted file
shell: powershell
continue-on-error: true
run: |
signtool sign /f ./certificate.pfx /p $env:MACOS_P12_PASSWORD ./SignOutput/${{ env.APP_NAME_LOW }}-${{ env.VERSION }}-${{ matrix.job.arch }}.exe
signtool sign /f ./certificate.pfx /p ${{ secrets.MACOS_P12_PASSWORD }} ./SignOutput/${{ env.APP_NAME_LOW }}-${{ env.VERSION }}-${{ matrix.job.arch }}.exe
# - name: Publish Release
# uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit f4fab1e

Please sign in to comment.