From 52fdbf3fae9a01c067c99d2be66376a6b6f63f9e Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Fri, 30 Sep 2022 16:43:06 -0700 Subject: [PATCH] Build snowflake, meek, and finally OnionShare itself. Compress it, and store it as an artifact --- .github/workflows/build-windows.yml | 51 ++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index b987cefa..fe378fb5 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -46,4 +46,53 @@ jobs: } else { cd desktop .\scripts\build-pt-obfs4proxy.ps1 - } \ No newline at end of file + } + + - name: Restore cache - snowflake + uses: actions/cache@v3 + with: + path: desktop\onionshare\resources\tor\snowflake-client.exe + key: ${{ runner.os }}-win64-snowflake-${{ hashFiles('desktop/scripts/build-pt-snowflake.ps1') }} + + - name: Build snowflake + shell: pwsh + run: | + if ((Test-Path -Path 'project\desktop\onionshare\resources\tor\snowflake-client.exe') -eq $True) { + Write-Output "snowflake already built" + } else { + cd desktop + .\scripts\build-pt-snowflake.ps1 + } + + - name: Restore cache - meek + uses: actions/cache@v3 + with: + path: desktop\onionshare\resources\tor\meek-client.exe + key: ${{ runner.os }}-win64-meek-${{ hashFiles('desktop/scripts/build-pt-meek.ps1') }} + + - name: Build meek + shell: pwsh + run: | + if ((Test-Path -Path 'project\desktop\onionshare\resources\tor\meek-client.exe') -eq $True) { + Write-Output "meek already built" + } else { + cd desktop + .\scripts\build-pt-meek.ps1 + } + + - name: Build OnionShare + run: | + cd desktop + C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts\poetry run python .\setup-freeze.py build + C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts\poetry run python .\scripts\build-windows.py cleanup-build + + - name: Compress + shell: pwsh + run: | + mv desktop\build\exe.win-amd64-3.9\ ~\onionshare-win64 + Compress-Archive -LiteralPath ~\onionshare-win64 -DestinationPath ~\onionshare-win64.zip + + - uses: actions/upload-artifact@v3 + with: + name: win64-build + path: ~\onionshare-win64.zip