Build Starc for Windows #1009
This file contains hidden or 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: Build Starc for Windows | |
| env: | |
| APP_VERSION: 0.8.1 | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| create: | |
| tags: | |
| - v* | |
| workflow_dispatch: {} | |
| jobs: | |
| build_windows_64_qt5: | |
| name: Build Windows 64 version with qt5 | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout sources for push or create tag event | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@master | |
| with: | |
| token: ${{ secrets.ACTION_RUNNER }} | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Checkout sources for pull request event | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@master | |
| - name: Checkout submodules for pull request event | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| git submodule update --init --recursive src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/ | |
| - name: Add info about dev build to the env | |
| shell: bash | |
| run: | | |
| DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count) | |
| echo "DEV_BUILD=$DEV_BUILD" >> $GITHUB_ENV | |
| if [ "$DEV_BUILD" -gt "0" ]; then | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}} dev $DEV_BUILD-qt5" >> $GITHUB_ENV | |
| else | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}}-qt5" >> $GITHUB_ENV | |
| fi | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: 5.15.2 | |
| arch: win64_msvc2019_64 | |
| target: desktop | |
| setup-python: false | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| choco install nsis | |
| mkdir -p build/windows/openssl | |
| curl -O --output-dir build/windows/openssl https://starc.app/downloads/3rd_party/openssl/libcrypto-1_1-x64.dll | |
| curl -O --output-dir build/windows/openssl https://starc.app/downloads/3rd_party/openssl/libssl-1_1-x64.dll | |
| - name: Configure MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh -a x64 | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro CONFIG+=release DEFINES+="DEV_BUILD=$DEV_BUILD" CRASHPAD_ARCH=x64 | |
| - name: Build | |
| run: | | |
| cd src | |
| nmake | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Setup Rust | |
| shell: bash | |
| run: | | |
| rustup default stable | |
| rustc --version | |
| cargo --version | |
| - name: Install dependencies for node-dump-syms | |
| shell: bash | |
| run: | | |
| npm install -g @mapbox/node-pre-gyp cargo-cp-artifact | |
| - name: Install node-dump-syms | |
| run: | | |
| npm i -g node-dump-syms | |
| - name: Upload debug symbols from _build folder | |
| if: github.ref == 'refs/heads/master' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-win" | |
| version: ${{env.BUGSPLAT_VERSION}} | |
| files: "*.{pdb,exe,dll}" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Upload debug symbols from _build/plugins folder | |
| if: github.ref == 'refs/heads/master' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-win" | |
| version: ${{env.BUGSPLAT_VERSION}} | |
| files: "*.{pdb,dll}" | |
| directory: "src/_build/plugins" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Prepare installer folder | |
| shell: bash | |
| run: | | |
| cd build/windows | |
| ./make-exe_qt5_64.sh ${{env.APP_VERSION}} | |
| - name: Make installer | |
| uses: joncloud/[email protected] | |
| with: | |
| arguments: "/V3" | |
| script-file: "build/windows/starc_qt5_64.nsi" | |
| - name: Make archive with portable version | |
| uses: vimtor/action-zip@v1 | |
| with: | |
| files: build/windows/files_64 | |
| dest: build/windows/starc-qt5-64.zip | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows_64 packages with qt5 | |
| path: | | |
| build/windows/starc-setup-qt5-64.exe | |
| build/windows/starc-qt5-64.zip | |
| - name: Publish artifacts to the GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| build/windows/starc-setup-qt5-64.exe | |
| build/windows/starc-qt5-64.zip | |
| - name: Notify clients that stable release published | |
| if: startsWith(github.ref, 'refs/tags/') | |
| shell: bash | |
| run: | | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=windows64" -F "qt=5" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify | |
| build_windows_32_qt5: | |
| name: Build Windows 32 version with qt5 | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout sources for push or create tag event | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@master | |
| with: | |
| token: ${{ secrets.ACTION_RUNNER }} | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Checkout sources for pull request event | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@master | |
| - name: Checkout submodules for pull request event | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| git submodule update --init --recursive src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/ | |
| - name: Add info about dev build to the env | |
| shell: bash | |
| run: | | |
| DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count) | |
| echo "DEV_BUILD=$DEV_BUILD" >> $GITHUB_ENV | |
| if [ "$DEV_BUILD" -gt "0" ]; then | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}} dev $DEV_BUILD-qt5" >> $GITHUB_ENV | |
| else | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}}-qt5" >> $GITHUB_ENV | |
| fi | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: 5.15.2 | |
| arch: win32_msvc2019 | |
| target: desktop | |
| setup-python: false | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| choco install openssl --version=1.1.1.2100 --forcex86 | |
| choco install nsis | |
| mkdir -p build/windows/openssl | |
| curl -O --output-dir build/windows/openssl https://starc.app/downloads/3rd_party/openssl/libcrypto-1_1.dll | |
| curl -O --output-dir build/windows/openssl https://starc.app/downloads/3rd_party/openssl/libssl-1_1.dll | |
| - name: Configure MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x86 | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh -a x86 | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro CONFIG+=release DEFINES+="DEV_BUILD=$DEV_BUILD" CRASHPAD_ARCH=x86 | |
| - name: Build | |
| run: | | |
| cd src | |
| nmake | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Setup Rust | |
| shell: bash | |
| run: | | |
| rustup default stable | |
| rustc --version | |
| cargo --version | |
| - name: Install dependencies for node-dump-syms | |
| shell: bash | |
| run: | | |
| npm install -g @mapbox/node-pre-gyp cargo-cp-artifact | |
| - name: Install node-dump-syms | |
| run: | | |
| npm i -g node-dump-syms | |
| - name: Upload debug symbols from _build folder | |
| if: github.ref == 'refs/heads/master' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-win" | |
| version: ${{env.BUGSPLAT_VERSION}}-x32 | |
| files: "*.{pdb,exe,dll}" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Upload debug symbols from _build/plugins folder | |
| if: github.ref == 'refs/heads/master' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-win" | |
| version: ${{env.BUGSPLAT_VERSION}}-x32 | |
| files: "*.{pdb,dll}" | |
| directory: "src/_build/plugins" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Prepare installer folder | |
| shell: bash | |
| run: | | |
| cd build/windows | |
| ./make-exe_qt5_32.sh ${{env.APP_VERSION}} | |
| - name: Make installer | |
| uses: joncloud/[email protected] | |
| with: | |
| arguments: "/V3" | |
| script-file: "build/windows/starc_qt5_32.nsi" | |
| - name: Make archive with portable version | |
| uses: vimtor/action-zip@v1 | |
| with: | |
| files: build/windows/files_32 | |
| dest: build/windows/starc-qt5-32.zip | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows_32 packages with qt5 | |
| path: | | |
| build/windows/starc-setup-qt5-32.exe | |
| build/windows/starc-qt5-32.zip | |
| - name: Publish artifacts to GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| build/windows/starc-setup-qt5-32.exe | |
| build/windows/starc-qt5-32.zip | |
| - name: Notify clients that stable release published | |
| if: startsWith(github.ref, 'refs/tags/') | |
| shell: bash | |
| run: | | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=windows32" -F "qt=5" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify | |
| build_windows_64_qt6: | |
| name: Build Windows 64 version with qt6 | |
| runs-on: windows-latest | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Checkout sources for push or create tag event | |
| if: github.event_name != 'pull_request' | |
| uses: actions/checkout@master | |
| with: | |
| token: ${{ secrets.ACTION_RUNNER }} | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Checkout sources for pull request event | |
| if: github.event_name == 'pull_request' | |
| uses: actions/checkout@master | |
| - name: Checkout submodules for pull request event | |
| if: github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| git submodule update --init --recursive src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/ | |
| - name: Add info about dev build to the env | |
| shell: bash | |
| run: | | |
| DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count) | |
| echo "DEV_BUILD=$DEV_BUILD" >> $GITHUB_ENV | |
| if [ "$DEV_BUILD" -gt "0" ]; then | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}} dev $DEV_BUILD-qt6" >> $GITHUB_ENV | |
| else | |
| echo "BUGSPLAT_VERSION=${{env.APP_VERSION}}-qt6" >> $GITHUB_ENV | |
| fi | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: 6.8.3 | |
| arch: win64_msvc2022_64 | |
| target: desktop | |
| setup-python: false | |
| modules: "qt5compat qtimageformats qtmultimedia qtspeech qtwebsockets" | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| choco install openssl --version=3.1.1 | |
| choco install jom | |
| choco install nsis | |
| - name: Configure MSVC | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh -a x64 | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro CONFIG+=release DEFINES+="DEV_BUILD=$DEV_BUILD" CRASHPAD_ARCH=x64 | |
| - name: Build | |
| run: | | |
| cd src | |
| jom -j4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Setup Rust | |
| shell: bash | |
| run: | | |
| rustup default stable | |
| rustc --version | |
| cargo --version | |
| - name: Install dependencies for node-dump-syms | |
| shell: bash | |
| run: | | |
| npm install -g @mapbox/node-pre-gyp cargo-cp-artifact | |
| - name: Install node-dump-syms | |
| run: | | |
| npm i -g node-dump-syms | |
| - name: Upload debug symbols from _build folder | |
| if: github.ref == 'refs/heads/master' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-win" | |
| version: ${{env.BUGSPLAT_VERSION}} | |
| files: "*.{pdb,exe,dll}" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Upload debug symbols from _build/plugins folder | |
| if: github.ref == 'refs/heads/master' | |
| uses: BugSplat-Git/symbol-upload@main | |
| with: | |
| username: "${{ secrets.BUGSPLAT_USER }}" | |
| password: "${{ secrets.BUGSPLAT_PASSWORD }}" | |
| database: "${{ secrets.BUGSPLAT_DATABASE }}" | |
| application: "starcapp-win" | |
| version: ${{env.BUGSPLAT_VERSION}} | |
| files: "*.{pdb,dll}" | |
| directory: "src/_build/plugins" | |
| node-version: "22" | |
| dumpSyms: true | |
| - name: Prepare installer folder | |
| shell: bash | |
| run: | | |
| cd build/windows | |
| ./make-exe_64.sh ${{env.APP_VERSION}} | |
| - name: Make installer | |
| uses: joncloud/[email protected] | |
| with: | |
| arguments: "/V3" | |
| script-file: "build/windows/starc_64.nsi" | |
| - name: Make archive with portable version | |
| uses: vimtor/action-zip@v1 | |
| with: | |
| files: build/windows/files_64 | |
| dest: build/windows/starc.zip | |
| - name: Update manifest | |
| shell: pwsh | |
| env: | |
| APPXMANIFEST_PATH: build\windows\msix\AppxManifest.xml | |
| BUILD_VERSION: ${{ env.APP_VERSION }}.0 | |
| run: | | |
| $xml = [xml](Get-Content $env:APPXMANIFEST_PATH) | |
| $xml.Package.Identity.ProcessorArchitecture = "x64" | |
| $xml.Package.Identity.Version = $env:BUILD_VERSION | |
| $xml.save($env:APPXMANIFEST_PATH) | |
| - name: Build MSIX package | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Path build/windows/files_64/images | |
| Copy-Item -Path build/windows/msix/visual-elements/* -Destination build/windows/files_64/images -Recurse | |
| cp build/windows/msix/AppxManifest.xml build/windows/files_64 | |
| $env:PATH = $env:PATH + ";C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64" | |
| makeappx.exe pack /d build/windows/files_64 /p build/windows/starc-package.msix | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows_64 packages | |
| path: | | |
| build/windows/starc-setup.exe | |
| build/windows/starc.zip | |
| build/windows/starc-package.msix | |
| - name: Publish artifacts to the dev stream and notify clients | |
| if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') != true | |
| shell: pwsh | |
| env: | |
| STARC_API_KEY: ${{ secrets.STARC_API_KEY }} | |
| BUILD_VERSION: ${{env.APP_VERSION}} dev ${{env.DEV_BUILD}} | |
| run: | | |
| $PublishForm = @{ | |
| api_key = $env:STARC_API_KEY | |
| name_for_file = 'starc-setup.exe' | |
| file_bin = Get-Item -Path 'build\windows\starc-setup.exe' | |
| } | |
| Invoke-WebRequest -Uri 'https://starc.app/api/app/updates/publish' -Method Post -Form $PublishForm | |
| $NotifyForm = @{ | |
| api_key = $env:STARC_API_KEY | |
| system = 'windows64' | |
| version = $env:BUILD_VERSION | |
| } | |
| Invoke-WebRequest -Uri 'https://starc.app/api/app/updates/notify' -Method Post -Form $NotifyForm | |
| - name: Publish artifacts to the GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| build/windows/starc-setup.exe | |
| build/windows/starc.zip | |
| build/windows/starc-package.msix | |
| - name: Notify clients that stable release published | |
| if: startsWith(github.ref, 'refs/tags/') | |
| shell: bash | |
| run: | | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=windows64" -F "qt=6" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify |