_templates: _community_beta: file: build-app-beta.yaml defs: - _community - _beta - _channel - _release string-replace: "<>": '' "<>": '--community' "<>": 'app/dist' "<>": beta "<>": 'beta' _community_stable: file: build-app.yaml defs: - _community - _stable - _release string-replace: "<>": '' "<>": '--community' "<>": 'app/dist' "<>": 'latest' _community_check: file: build-app-check.yaml defs: - _community - _beta string-replace: "<>": '' "<>": '--community' "<>": 'app/dist' "<>": 'check' _premium_beta: file: build-app-pro-beta.yaml defs: - _premium - _beta - _channel - _release string-replace: "<>": | cd .. cd dbgate-merged "<>": '--premium' "<>": '../dbgate-merged/app/dist' "<>": 'premium-beta' "<>": 'premium-beta' _premium_stable: file: build-app-pro.yaml defs: - _premium - _stable - _channel - _release string-replace: "<>": | cd .. cd dbgate-merged "<>": '--premium' "<>": '../dbgate-merged/app/dist' "<>": 'premium' "<>": 'premium-latest' name: _community_beta: Electron app BETA _community_stable: Electron app _premium_beta: Electron app PREMIUM BETA _premium_stable: Electron app PREMIUM _community_check: Electron app check build on: push: tags: - _community_beta: 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' _premium_beta: 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+' _stable: 'v[0-9]+.[0-9]+.[0-9]+' _community_check: 'check-[0-9]+-[0-9]+-[0-9]+.[0-9]+' # - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 # branches: # - production permissions: id-token: write contents: write jobs: build: runs-on: ${{ matrix.os }} environment: dbgate-app strategy: fail-fast: false matrix: # os: [ubuntu-22.04, windows-2016] os: [macos-14, windows-2022, ubuntu-22.04] steps: - name: Install python 3.11 (MacOS) if: matrix.os == 'macos-14' run: | brew install python@3.11 echo "PYTHON=/opt/homebrew/bin/python3.11" >> $GITHUB_ENV - name: Context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - uses: actions/checkout@v2 with: fetch-depth: 1 - name: Use Node.js 22.x uses: actions/setup-node@v1 with: node-version: 22.x - _include: checkout-and-merge-pro _if: _premium - name: adjustPackageJson run: | <> node adjustPackageJson <> - name: setUpdaterChannel <> _if: _channel run: | <> node setUpdaterChannel <> - name: yarn set timeout run: | <> yarn config set network-timeout 100000 - name: yarn install run: | <> yarn install - name: setCurrentVersion run: | <> yarn setCurrentVersion - name: fillPackagedPlugins run: | <> yarn fillPackagedPlugins - name: Install Snapcraft _if: _community if: matrix.os == 'ubuntu-22.04' uses: samuelmeuli/action-snapcraft@v1 - name: Publish Windows if: matrix.os == 'windows-2022' run: | <> yarn run build:app # env: # GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish - name: Publish MacOS if: matrix.os == 'macos-14' run: | <> yarn run build:app env: # GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }} CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }} APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} - name: Publish Linux if: matrix.os == 'ubuntu-22.04' run: | <> yarn run build:app env: # GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} - name: generatePadFile _if: _community_stable run: | yarn generatePadFile - name: Azure login (OIDC) uses: azure/login@v2 if: matrix.os == 'windows-2022' with: client-id: ${{ secrets.AZURE_TC_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_TC_TENANT_ID }} allow-no-subscriptions: true - name: Sign Windows artifacts with Azure Trusted Signing uses: azure/trusted-signing-action@v0 if: matrix.os == 'windows-2022' with: endpoint: https://wus3.codesigning.azure.net/ trusted-signing-account-name: DbGate certificate-profile-name: DbGate-Release files-folder: <> files-folder-filter: exe timestamp-rfc3161: http://timestamp.acs.microsoft.com timestamp-digest: SHA256 - name: Fix YML hashes if: matrix.os == 'windows-2022' run: | <> yarn run fixYmlHashes - name: Copy artifacts run: | mkdir artifacts cp <>/*.deb artifacts/dbgate-<>.deb || true cp <>/*x86*.AppImage artifacts/dbgate-<>.AppImage || true cp <>/*arm64*.AppImage artifacts/dbgate-<>-arm64.AppImage || true cp <>/*armv7l*.AppImage artifacts/dbgate-<>-armv7l.AppImage || true cp <>/*win*.exe artifacts/dbgate-<>.exe || true cp <>/*win_x64.zip artifacts/dbgate-windows-<>.zip || true cp <>/*win_arm64.zip artifacts/dbgate-windows-<>-arm64.zip || true cp <>/*win_arm64.exe artifacts/dbgate-windows-<>-arm64.exe || true cp <>/*-mac_universal.dmg artifacts/dbgate-<>.dmg || true cp <>/*-mac_x64.dmg artifacts/dbgate-<>-x64.dmg || true cp <>/*-mac_arm64.dmg artifacts/dbgate-<>-arm64.dmg || true mv <>/*.snap artifacts/dbgate-<>.snap || true mv <>/*.exe artifacts/ || true mv <>/*.zip artifacts/ || true mv <>/*.tar.gz artifacts/ || true mv <>/*.AppImage artifacts/ || true mv <>/*.deb artifacts/ || true mv <>/*.snap artifacts/ || true mv <>/*.dmg artifacts/ || true mv <>/*.blockmap artifacts/ || true mv <>/*.yml artifacts/ || true rm artifacts/builder-debug.yml - name: Copy PAD file _if: _community_stable if: matrix.os == 'windows-2022' run: | mv app/dist/dbgate-pad.xml artifacts/ || true - name: Upload artifacts _if: _release uses: actions/upload-artifact@v4 with: name: ${{ matrix.os }} path: artifacts - name: Release _if: _release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: files: 'artifacts/**' prerelease: _beta: true _stable: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Print content of notarization-error.log if: failure() && matrix.os == 'macos-14' run: | <> find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;