From 36e2f1bdee8ddae44b55f90e1286d49f1b0e6c19 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Mon, 30 Dec 2024 08:11:18 +0100 Subject: [PATCH] workflow templates --- workflow-templates/build-app-beta.yaml | 133 ---------------- workflow-templates/build-app-pro-beta.yaml | 160 ------------------- workflow-templates/build-app-pro.yaml | 153 ------------------ workflow-templates/build-app.tpl.yaml | 126 +++++++++------ workflow-templates/build-app.yaml | 175 --------------------- workflow-templates/build-npm-pro.yaml | 19 +-- 6 files changed, 75 insertions(+), 691 deletions(-) delete mode 100644 workflow-templates/build-app-beta.yaml delete mode 100644 workflow-templates/build-app-pro-beta.yaml delete mode 100644 workflow-templates/build-app-pro.yaml delete mode 100644 workflow-templates/build-app.yaml diff --git a/workflow-templates/build-app-beta.yaml b/workflow-templates/build-app-beta.yaml deleted file mode 100644 index 7b7fd078c..000000000 --- a/workflow-templates/build-app-beta.yaml +++ /dev/null @@ -1,133 +0,0 @@ -name: Electron app BETA - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [macos-14, windows-2022, ubuntu-22.04] - # os: [macOS-10.15] - - 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 - - name: adjustPackageJson - run: | - node adjustPackageJson --community - - name: setUpdaterChannel beta - run: | - node setUpdaterChannel beta - - name: yarn set timeout - run: | - yarn config set network-timeout 100000 - - name: yarn install - run: | - yarn install - - name: setCurrentVersion - run: | - yarn setCurrentVersion - - name: printSecrets - run: | - yarn printSecrets - env: - GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}} - - name: fillPackagedPlugins - run: | - yarn fillPackagedPlugins - - name: Install Snapcraft - if: matrix.os == 'ubuntu-22.04' - uses: samuelmeuli/action-snapcraft@v1 - - name: Publish - run: | - yarn run build:app - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish - - WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }} - WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }} - # WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }} - # WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }} - - 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 }} - - SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} - APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} - - # - name: publishSnap - # if: matrix.os == 'ubuntu-22.04' - # run: | - # snapcraft upload --release=beta app/dist/*.snap - # env: - # SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} - - - name: Copy artifacts - run: | - mkdir artifacts - - cp app/dist/*.deb artifacts/dbgate-beta.deb || true - cp app/dist/*x86*.AppImage artifacts/dbgate-beta.AppImage || true - cp app/dist/*arm64*.AppImage artifacts/dbgate-beta-arm64.AppImage || true - cp app/dist/*armv7l*.AppImage artifacts/dbgate-beta-armv7l.AppImage || true - cp app/dist/*win*.exe artifacts/dbgate-beta.exe || true - cp app/dist/*win_x64.zip artifacts/dbgate-windows-beta.zip || true - cp app/dist/*win_arm64.zip artifacts/dbgate-windows-beta-arm64.zip || true - cp app/dist/*-mac_x64.dmg artifacts/dbgate-beta.dmg || true - cp app/dist/*-mac_arm64.dmg artifacts/dbgate-beta-arm64.dmg || true - - mv app/dist/*.exe artifacts/ || true - mv app/dist/*.zip artifacts/ || true - mv app/dist/*.tar.gz artifacts/ || true - mv app/dist/*.AppImage artifacts/ || true - mv app/dist/*.deb artifacts/ || true - mv app/dist/*.snap artifacts/ || true - mv app/dist/*.dmg artifacts/ || true - mv app/dist/*.blockmap artifacts/ || true - - mv app/dist/*.yml artifacts/ || true - rm artifacts/builder-debug.yml - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.os }} - path: artifacts - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: 'artifacts/**' - prerelease: true - 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 {} ===" \; diff --git a/workflow-templates/build-app-pro-beta.yaml b/workflow-templates/build-app-pro-beta.yaml deleted file mode 100644 index 6c88962e0..000000000 --- a/workflow-templates/build-app-pro-beta.yaml +++ /dev/null @@ -1,160 +0,0 @@ -name: Electron app PREMIUM BETA - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - # os: [windows-2022] - # os: [ubuntu-22.04] - # os: [windows-2022, ubuntu-22.04] - os: [macos-14, windows-2022, ubuntu-22.04] - # os: [macOS-10.15] - - 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 - - - name: Checkout dbgate/dbgate-pro - uses: actions/checkout@v2 - with: - repository: dbgate/dbgate-pro - token: ${{ secrets.GH_TOKEN }} - path: dbgate-pro - - - name: Merge dbgate/dbgate-pro - run: | - mkdir ../dbgate-pro - mv dbgate-pro/* ../dbgate-pro/ - cd .. - mkdir dbgate-merged - cd dbgate-pro - cd sync - yarn - node sync.js --nowatch - cd .. - - - name: adjustPackageJson - run: | - cd .. - cd dbgate-merged - node adjustPackageJson --premium - - name: setUpdaterChannel premium-beta - run: | - cd .. - cd dbgate-merged - node setUpdaterChannel premium-beta - - name: yarn set timeout - run: | - cd .. - cd dbgate-merged - yarn config set network-timeout 100000 - - name: yarn install - run: | - cd .. - cd dbgate-merged - yarn install - - name: setCurrentVersion - run: | - cd .. - cd dbgate-merged - yarn setCurrentVersion - - name: printSecrets - run: | - cd .. - cd dbgate-merged - yarn printSecrets - env: - GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}} - - name: fillPackagedPlugins - run: | - cd .. - cd dbgate-merged - yarn fillPackagedPlugins - - name: Publish - run: | - cd .. - cd dbgate-merged - yarn run build:app - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish - - WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }} - WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }} - # WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }} - # WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }} - - 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}} - - # DEBUG: electron-builder, electron-notarize, notarytool - - - - name: Copy artifacts - run: | - mkdir artifacts - - cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-beta.AppImage || true - cp ../dbgate-merged/app/dist/*win*.exe artifacts/dbgate-premium-beta.exe || true - cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-beta.dmg || true - - mv ../dbgate-merged/app/dist/*.exe artifacts/ || true - mv ../dbgate-merged/app/dist/*.zip artifacts/ || true - mv ../dbgate-merged/app/dist/*.tar.gz artifacts/ || true - mv ../dbgate-merged/app/dist/*.AppImage artifacts/ || true - mv ../dbgate-merged/app/dist/*.deb artifacts/ || true - mv ../dbgate-merged/app/dist/*.snap artifacts/ || true - mv ../dbgate-merged/app/dist/*.dmg artifacts/ || true - mv ../dbgate-merged/app/dist/*.blockmap artifacts/ || true - - mv ../dbgate-merged/app/dist/*.yml artifacts/ || true - rm artifacts/builder-debug.yml - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.os }} - path: artifacts - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: 'artifacts/**' - prerelease: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Print content of notarization-error.log - if: failure() && matrix.os == 'macos-14' - run: | - cd .. - cd dbgate-merged - find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \; diff --git a/workflow-templates/build-app-pro.yaml b/workflow-templates/build-app-pro.yaml deleted file mode 100644 index 50f1f0feb..000000000 --- a/workflow-templates/build-app-pro.yaml +++ /dev/null @@ -1,153 +0,0 @@ -name: Electron app PREMIUM - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - # - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - - # branches: - # - production - -jobs: - build: - runs-on: ${{ matrix.os }} - - 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 - - - name: Checkout dbgate/dbgate-pro - uses: actions/checkout@v2 - with: - repository: dbgate/dbgate-pro - token: ${{ secrets.GH_TOKEN }} - path: dbgate-pro - - - name: Merge dbgate/dbgate-pro - run: | - mkdir ../dbgate-pro - mv dbgate-pro/* ../dbgate-pro/ - cd .. - mkdir dbgate-merged - cd dbgate-pro - cd sync - yarn - node sync.js --nowatch - cd .. - - - name: adjustPackageJson - run: | - cd .. - cd dbgate-merged - node adjustPackageJson --premium - - name: setUpdaterChannel premium - run: | - cd .. - cd dbgate-merged - node setUpdaterChannel premium - - name: yarn set timeout - run: | - cd .. - cd dbgate-merged - yarn config set network-timeout 100000 - - name: yarn install - run: | - cd .. - cd dbgate-merged - yarn install - - name: setCurrentVersion - run: | - cd .. - cd dbgate-merged - yarn setCurrentVersion - - name: printSecrets - run: | - cd .. - cd dbgate-merged - yarn printSecrets - env: - GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}} - - name: fillPackagedPlugins - run: | - cd .. - cd dbgate-merged - yarn fillPackagedPlugins - - name: Publish - run: | - cd .. - cd dbgate-merged - yarn run build:app - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish - - WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }} - WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }} - # WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }} - # WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }} - - 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: Copy artifacts - run: | - mkdir artifacts - - cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-latest.AppImage || true - cp ../dbgate-merged/app/dist/*.exe artifacts/dbgate-premium-latest.exe || true - cp ../dbgate-merged/app/dist/*win_x64.zip artifacts/dbgate-premium-windows-latest.zip || true - cp ../dbgate-merged/app/dist/*win_arm64.zip artifacts/dbgate-premium-windows-latest-arm64.zip || true - cp ../dbgate-merged/app/dist/*-mac_universal.dmg artifacts/dbgate-premium-latest.dmg || true - cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-latest-x64.dmg || true - cp ../dbgate-merged/app/dist/*-mac_arm64.dmg artifacts/dbgate-premium-latest-arm64.dmg || true - - mv ../dbgate-merged/app/dist/*.exe artifacts/ || true - mv ../dbgate-merged/app/dist/*.zip artifacts/ || true - mv ../dbgate-merged/app/dist/*.tar.gz artifacts/ || true - mv ../dbgate-merged/app/dist/*.AppImage artifacts/ || true - mv ../dbgate-merged/app/dist/*.deb artifacts/ || true - mv ../dbgate-merged/app/dist/*.dmg artifacts/ || true - mv ../dbgate-merged/app/dist/*.blockmap artifacts/ || true - - mv ../dbgate-merged/app/dist/*.yml artifacts/ || true - rm artifacts/builder-debug.yml - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.os }} - path: artifacts - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: 'artifacts/**' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/workflow-templates/build-app.tpl.yaml b/workflow-templates/build-app.tpl.yaml index 03a20c898..37598e53a 100644 --- a/workflow-templates/build-app.tpl.yaml +++ b/workflow-templates/build-app.tpl.yaml @@ -4,9 +4,13 @@ _templates: defs: - _community - _beta + - _channel string-replace: "<>": '' "<>": '--community' + "<>": 'app/dist' + "<>": beta + "<>": 'beta' _community_stable: file: build-app.yaml defs: @@ -15,27 +19,38 @@ _templates: string-replace: "<>": '' "<>": '--community' + "<>": 'app/dist' + "<>": 'latest' + _premium_beta: file: build-app-pro-beta.yaml defs: - _premium - _beta + - _channel 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 string-replace: "<>": | cd .. cd dbgate-merged "<>": '--premium' + "<>": '../dbgate-merged/app/dist' + "<>": 'premium' + "<>": 'premium-latest' name: _community_beta: Electron app BETA @@ -82,66 +97,47 @@ jobs: with: node-version: 22.x - - name: Checkout dbgate/dbgate-pro - uses: actions/checkout@v2 - with: - repository: dbgate/dbgate-pro - token: ${{ secrets.GH_TOKEN }} - path: dbgate-pro - - - name: Merge dbgate/dbgate-pro - run: | - mkdir ../dbgate-pro - mv dbgate-pro/* ../dbgate-pro/ - cd .. - mkdir dbgate-merged - cd dbgate-pro - cd sync - yarn - node sync.js --nowatch - cd .. + - _include: checkout-and-merge-pro + _if: _premium - name: adjustPackageJson run: | - cd .. - cd dbgate-merged - node adjustPackageJson --premium - - name: setUpdaterChannel premium + <> + node adjustPackageJson <> + - name: setUpdaterChannel <> + _if: _channel run: | - cd .. - cd dbgate-merged - node setUpdaterChannel premium + <> + node setUpdaterChannel <> - name: yarn set timeout run: | - cd .. - cd dbgate-merged + <> yarn config set network-timeout 100000 - name: yarn install run: | - cd .. - cd dbgate-merged + <> yarn install - name: setCurrentVersion run: | - cd .. - cd dbgate-merged + <> yarn setCurrentVersion - name: printSecrets run: | - cd .. - cd dbgate-merged + <> yarn printSecrets env: GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}} - name: fillPackagedPlugins run: | - cd .. - cd dbgate-merged + <> yarn fillPackagedPlugins + - name: Install Snapcraft + _if: _community + if: matrix.os == 'ubuntu-22.04' + uses: samuelmeuli/action-snapcraft@v1 - name: Publish run: | - cd .. - cd dbgate-merged + <> yarn run build:app env: GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish @@ -158,31 +154,48 @@ jobs: APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} + - name: generatePadFile + _if: _community_stable + run: | + yarn generatePadFile + - name: Copy artifacts run: | mkdir artifacts - cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-latest.AppImage || true - cp ../dbgate-merged/app/dist/*.exe artifacts/dbgate-premium-latest.exe || true - cp ../dbgate-merged/app/dist/*win_x64.zip artifacts/dbgate-premium-windows-latest.zip || true - cp ../dbgate-merged/app/dist/*win_arm64.zip artifacts/dbgate-premium-windows-latest-arm64.zip || true - cp ../dbgate-merged/app/dist/*-mac_universal.dmg artifacts/dbgate-premium-latest.dmg || true - cp ../dbgate-merged/app/dist/*-mac_x64.dmg artifacts/dbgate-premium-latest-x64.dmg || true - cp ../dbgate-merged/app/dist/*-mac_arm64.dmg artifacts/dbgate-premium-latest-arm64.dmg || true + 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 <>/*-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 ../dbgate-merged/app/dist/*.exe artifacts/ || true - mv ../dbgate-merged/app/dist/*.zip artifacts/ || true - mv ../dbgate-merged/app/dist/*.tar.gz artifacts/ || true - mv ../dbgate-merged/app/dist/*.AppImage artifacts/ || true - mv ../dbgate-merged/app/dist/*.deb artifacts/ || true - mv ../dbgate-merged/app/dist/*.dmg artifacts/ || true - mv ../dbgate-merged/app/dist/*.blockmap artifacts/ || 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 ../dbgate-merged/app/dist/*.yml 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 uses: actions/upload-artifact@v4 with: @@ -194,5 +207,14 @@ jobs: 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 {} ===" \; diff --git a/workflow-templates/build-app.yaml b/workflow-templates/build-app.yaml deleted file mode 100644 index 208911397..000000000 --- a/workflow-templates/build-app.yaml +++ /dev/null @@ -1,175 +0,0 @@ -name: Electron app - -on: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - # - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - - # branches: - # - production - -jobs: - build: - runs-on: ${{ matrix.os }} - - 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 - - name: adjustPackageJson - run: | - node adjustPackageJson --community - - name: yarn set timeout - run: | - yarn config set network-timeout 100000 - - name: yarn install - run: | - # yarn --version - # yarn config set network-timeout 300000 - yarn install - - name: setCurrentVersion - run: | - yarn setCurrentVersion - - name: printSecrets - run: | - yarn printSecrets - env: - GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}} - - name: fillPackagedPlugins - run: | - yarn fillPackagedPlugins - - name: Install Snapcraft - if: matrix.os == 'ubuntu-22.04' - uses: samuelmeuli/action-snapcraft@v1 - - name: Publish - run: | - yarn run build:app - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish - - WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }} - WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }} - # WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }} - # WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }} - - 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 }} - - SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} - APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} - - - name: generatePadFile - run: | - yarn generatePadFile - - # - name: publishSnap - # if: matrix.os == 'ubuntu-22.04' - # run: | - # snapcraft upload --release=stable app/dist/*.snap - # env: - # SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}} - - - name: Copy artifacts - run: | - mkdir artifacts - - cp app/dist/*.deb artifacts/dbgate-latest.deb || true - cp app/dist/*x86*.AppImage artifacts/dbgate-latest.AppImage || true - cp app/dist/*arm64*.AppImage artifacts/dbgate-latest-arm64.AppImage || true - cp app/dist/*armv7l*.AppImage artifacts/dbgate-latest-armv7l.AppImage || true - cp app/dist/*.exe artifacts/dbgate-latest.exe || true - cp app/dist/*win_x64.zip artifacts/dbgate-windows-latest.zip || true - cp app/dist/*win_arm64.zip artifacts/dbgate-windows-latest-arm64.zip || true - cp app/dist/*-mac_universal.dmg artifacts/dbgate-latest.dmg || true - cp app/dist/*-mac_x64.dmg artifacts/dbgate-latest-x64.dmg || true - cp app/dist/*-mac_arm64.dmg artifacts/dbgate-latest-arm64.dmg || true - - mv app/dist/*.exe artifacts/ || true - mv app/dist/*.zip artifacts/ || true - mv app/dist/*.tar.gz artifacts/ || true - mv app/dist/*.AppImage artifacts/ || true - mv app/dist/*.deb artifacts/ || true - mv app/dist/*.dmg artifacts/ || true - mv app/dist/*.snap artifacts/dbgate-latest.snap || true - mv app/dist/*.blockmap artifacts/ || true - - mv app/dist/*.yml artifacts/ || true - rm artifacts/builder-debug.yml - - # - name: Copy artifacts Linux, MacOs - # if: matrix.os != 'windows-2016' - # run: | - # mkdir artifacts - - # cp app/dist/*.AppImage artifacts/ || true - # cp app/dist/*.dmg artifacts/ || true - # cp app/dist/*.deb artifacts/ || true - - # mv app/dist/*.deb artifacts/dbgate-linux.deb || true - # mv app/dist/*.AppImage artifacts/dbgate-linux.AppImage || true - # mv app/dist/*.dmg artifacts/dbgate-mac.dmg || true - - # - name: Copy artifacts Win - # if: matrix.os == 'windows-2016' - # run: | - # mkdir artifacts - - # cp app/dist/*.exe artifacts/ || true - - # mv app/dist/*.exe artifacts/dbgate-windows.exe - - # mv app/dist/latest.yml artifacts/latest.yml || true - - - name: Copy PAD file - if: matrix.os == 'windows-2022' - run: | - mv app/dist/dbgate-pad.xml artifacts/ || true - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.os }} - path: artifacts - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: 'artifacts/**' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # - name: Create Release - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # tag_name: ${{ github.ref }} - # release_name: Release ${{ github.ref }} - # draft: false - # prerelease: false diff --git a/workflow-templates/build-npm-pro.yaml b/workflow-templates/build-npm-pro.yaml index 154d661c2..cdf9b6b5c 100644 --- a/workflow-templates/build-npm-pro.yaml +++ b/workflow-templates/build-npm-pro.yaml @@ -35,24 +35,7 @@ jobs: with: node-version: 18.x - - name: Checkout dbgate/dbgate-pro - uses: actions/checkout@v2 - with: - repository: dbgate/dbgate-pro - token: ${{ secrets.GH_TOKEN }} - path: dbgate-pro - - - name: Merge dbgate/dbgate-pro - run: | - mkdir ../dbgate-pro - mv dbgate-pro/* ../dbgate-pro/ - cd .. - mkdir dbgate-merged - cd dbgate-pro - cd sync - yarn - node sync.js --nowatch - cd .. + - _include: checkout-and-merge-pro - name: adjustNpmPackageJsonPremium run: |