Fix BugSplat integration #950
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 Mac | |
| env: | |
| APP_VERSION: 0.8.0 | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| create: | |
| tags: | |
| - v* | |
| workflow_dispatch: {} | |
| jobs: | |
| build_mac_qt5: | |
| name: Build Mac OS X version with qt5 | |
| runs-on: macos-latest | |
| timeout-minutes: 120 | |
| 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@v4 | |
| with: | |
| version: 5.15.2 | |
| target: desktop | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro DEFINES+="DEV_BUILD=$DEV_BUILD" | |
| - name: Build | |
| shell: bash | |
| run: | | |
| cd src | |
| make -j4 | |
| - name: Upload debug symbols | |
| 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-mac" | |
| version: "${{ env.BUGSPLAT_VERSION }}" | |
| files: "**/*.dSYM" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: false | |
| env: | |
| DEBUG: true | |
| - name: Make dmg image | |
| shell: bash | |
| run: | | |
| cd build/mac | |
| ./create_dmg.sh ${{env.APP_VERSION}} | |
| mv starc-setup.dmg starc-setup-qt5.dmg | |
| env: | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_ID_APP_PASSWORD: ${{ secrets.APPLE_ID_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mac packages with qt5 | |
| path: build/mac/starc-setup-qt5.dmg | |
| - name: Publish artifacts to the GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: build/mac/starc-setup-qt5.dmg | |
| - 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=mac" -F "qt=5" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify | |
| build_mac_qt6: | |
| name: Build Mac OS X version with qt6 | |
| runs-on: macos-latest | |
| timeout-minutes: 120 | |
| 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@v4 | |
| with: | |
| version: 6.8.3 | |
| target: desktop | |
| modules: 'qt5compat qtmultimedia qtspeech qtwebsockets' | |
| - name: Build crashpad | |
| shell: bash | |
| run: | | |
| cd build | |
| chmod +x ./build_crashpad.sh | |
| ./build_crashpad.sh -u | |
| - name: Run QMake | |
| shell: bash | |
| run: | | |
| cd src | |
| qmake starc.pro QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" CRASHPAD_ARCH=universal DEFINES+="DEV_BUILD=$DEV_BUILD" | |
| - name: Build | |
| shell: bash | |
| run: | | |
| cd src | |
| make -j4 | |
| - name: Upload debug symbols | |
| 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-mac" | |
| version: "${{ env.BUGSPLAT_VERSION }}" | |
| files: "**/*.dSYM" | |
| directory: "src/_build" | |
| node-version: "22" | |
| dumpSyms: false | |
| - name: Make dmg image | |
| shell: bash | |
| run: | | |
| cd build/mac | |
| ./create_dmg.sh ${{env.APP_VERSION}} | |
| env: | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_ID_APP_PASSWORD: ${{ secrets.APPLE_ID_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| - name: Collect artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mac packages with qt6 | |
| path: build/mac/starc-setup.dmg | |
| - name: Publish artifacts to the dev stream and notify clients | |
| if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') != true | |
| shell: bash | |
| run: | | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup.dmg" -F "file_bin=@build/mac/starc-setup.dmg" https://starc.app/api/app/updates/publish | |
| curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=mac" -F "qt=6" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify | |
| - name: Publish artifacts to the GitHub releases | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: build/mac/starc-setup.dmg | |
| - 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=mac" -F "qt=6" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify |