Publish Release #6
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: Publish Release | |
on: | |
workflow_dispatch: | |
inputs: | |
channel: | |
description: 'Release Channel' | |
required: true | |
default: 'releases' | |
type: choice | |
options: | |
- releases | |
- releases-staging | |
jobs: | |
release_win64: | |
runs-on: windows-2022 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Build | |
run: | | |
cmake -G "Visual Studio 17 2022" -A x64 -S. -Bcmake-build | |
cmake --build cmake-build --config Release | |
- | |
name: Sign | |
run: | | |
echo '${{ secrets.SIGNING_CERT }}'' >CodeSigningCert.b64 | |
certutil -decode CodeSigningCert.b64 CodeSigningCert.pfx | |
& 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.17763.0\\x86\\signtool.exe' sign /f CodeSigningCert.pfx /p '${{ secrets.SIGNING_PASS }}' /tr http://timestamp.digicert.com /td sha256 /fd sha256 /v cmake-build\\bin\\Release\\*.exe | |
- | |
name: Zip | |
run: 7z a -tzip remote-clients.zip cmake-build\bin\Release\*.exe | |
- | |
name: Install SSH Key | |
run: | | |
mkdir ~/.ssh | |
echo '${{ secrets.MACCHINA_IO_SSH_HOST_KEY }}' >~/.ssh/known_hosts | |
echo '${{ secrets.MACCHINA_SSH_KEY }}' >~/.ssh/id_rsa | |
- | |
name: Copy to web server | |
run: | | |
ssh ${{ secrets.MACCHINA_USER }}@web.macchina.io mkdir -p releases/sdk/windows/10/AMD64/ | |
scp cmake-build\bin\Release\*.exe cmake-build\bin\Release\*.zip ${{ secrets.MACCHINA_USER }}@web.macchina.io:releases/sdk/windows/10/AMD64/ |