2024-09-09 11:08:21 +00:00
|
|
|
name: Electron app PREMIUM BETA
|
2024-09-03 06:57:00 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
2024-09-09 11:08:21 +00:00
|
|
|
- 'v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+'
|
2024-09-03 06:57:00 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-09-05 12:20:25 +00:00
|
|
|
# os: [windows-2022]
|
2024-09-03 07:46:17 +00:00
|
|
|
# os: [ubuntu-22.04]
|
2024-09-03 11:21:45 +00:00
|
|
|
# os: [windows-2022, ubuntu-22.04]
|
2024-09-05 12:20:25 +00:00
|
|
|
os: [macos-12, windows-2022, ubuntu-22.04]
|
2024-09-03 06:57:00 +00:00
|
|
|
# os: [macOS-10.15]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Context
|
|
|
|
env:
|
|
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
|
|
run: echo "$GITHUB_CONTEXT"
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
- name: Use Node.js 18.x
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 18.x
|
2024-09-03 07:05:52 +00:00
|
|
|
|
2024-09-03 07:08:29 +00:00
|
|
|
- name: Checkout dbgate/dbgate-pro
|
2024-09-03 07:05:52 +00:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: dbgate/dbgate-pro
|
|
|
|
token: ${{ secrets.GH_TOKEN }}
|
2024-09-03 07:08:29 +00:00
|
|
|
path: dbgate-pro
|
2024-09-03 06:57:00 +00:00
|
|
|
|
|
|
|
- name: Merge dbgate/dbgate-pro
|
|
|
|
run: |
|
2024-09-03 07:14:37 +00:00
|
|
|
mkdir ../dbgate-pro
|
|
|
|
mv dbgate-pro/* ../dbgate-pro/
|
2024-09-03 06:57:00 +00:00
|
|
|
cd ..
|
|
|
|
mkdir dbgate-merged
|
|
|
|
cd dbgate-pro
|
|
|
|
cd sync
|
|
|
|
yarn
|
|
|
|
node sync.js --nowatch
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
- name: yarn adjustPackageJson
|
|
|
|
run: |
|
|
|
|
cd ..
|
|
|
|
cd dbgate-merged
|
|
|
|
yarn adjustPackageJson
|
2024-09-05 08:23:02 +00:00
|
|
|
- name: adjustPackageJsonPremium
|
2024-09-03 06:57:00 +00:00
|
|
|
run: |
|
|
|
|
cd ..
|
|
|
|
cd dbgate-merged
|
|
|
|
node adjustPackageJsonPremium
|
2024-09-05 08:23:02 +00:00
|
|
|
- name: setUpdaterChannel premium-beta
|
2024-09-05 08:20:39 +00:00
|
|
|
run: |
|
|
|
|
cd ..
|
|
|
|
cd dbgate-merged
|
|
|
|
node setUpdaterChannel premium-beta
|
2024-09-03 06:57:00 +00:00
|
|
|
- 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: fillNativeModulesElectron
|
|
|
|
run: |
|
|
|
|
cd ..
|
|
|
|
cd dbgate-merged
|
|
|
|
yarn fillNativeModulesElectron
|
|
|
|
- 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 }}
|
|
|
|
|
|
|
|
- name: Copy artifacts
|
|
|
|
run: |
|
|
|
|
mkdir artifacts
|
|
|
|
|
2024-09-03 07:25:59 +00:00
|
|
|
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
|
2024-09-03 06:57:00 +00:00
|
|
|
|
2024-09-03 07:25:59 +00:00
|
|
|
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
|
2024-09-09 15:00:21 +00:00
|
|
|
mv ../dbgate-merged/app/dist/*.blockmap artifacts/ || true
|
2024-09-03 06:57:00 +00:00
|
|
|
|
2024-09-05 08:20:39 +00:00
|
|
|
mv ../dbgate-merged/app/dist/*.yml artifacts/ || true
|
2024-09-05 09:40:40 +00:00
|
|
|
rm artifacts/builder-debug.yml
|
2024-09-05 08:20:39 +00:00
|
|
|
|
2024-09-03 06:57:00 +00:00
|
|
|
- name: Upload artifacts
|
2024-09-12 14:13:52 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-09-03 06:57:00 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}
|
2024-09-03 07:25:59 +00:00
|
|
|
path: artifacts
|
2024-09-03 06:57:00 +00:00
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
2024-09-03 07:25:59 +00:00
|
|
|
files: 'artifacts/**'
|
2024-09-03 06:57:00 +00:00
|
|
|
prerelease: true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|