mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 14:33:59 +00:00
workflow templates
This commit is contained in:
@@ -4,9 +4,13 @@ _templates:
|
||||
defs:
|
||||
- _community
|
||||
- _beta
|
||||
- _channel
|
||||
string-replace:
|
||||
"<<cd_merged>>": ''
|
||||
"<<adjust>>": '--community'
|
||||
"<<artifact-root>>": 'app/dist'
|
||||
"<<channel>>": beta
|
||||
"<<suffix>>": 'beta'
|
||||
_community_stable:
|
||||
file: build-app.yaml
|
||||
defs:
|
||||
@@ -15,27 +19,38 @@ _templates:
|
||||
string-replace:
|
||||
"<<cd_merged>>": ''
|
||||
"<<adjust>>": '--community'
|
||||
"<<artifact-root>>": 'app/dist'
|
||||
"<<suffix>>": 'latest'
|
||||
|
||||
|
||||
_premium_beta:
|
||||
file: build-app-pro-beta.yaml
|
||||
defs:
|
||||
- _premium
|
||||
- _beta
|
||||
- _channel
|
||||
string-replace:
|
||||
"<<cd_merged>>": |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
"<<adjust>>": '--premium'
|
||||
"<<artifact-root>>": '../dbgate-merged/app/dist'
|
||||
"<<channel>>": 'premium-beta'
|
||||
"<<suffix>>": 'premium-beta'
|
||||
_premium_stable:
|
||||
file: build-app-pro.yaml
|
||||
defs:
|
||||
- _premium
|
||||
- _stable
|
||||
- _channel
|
||||
string-replace:
|
||||
"<<cd_merged>>": |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
"<<adjust>>": '--premium'
|
||||
"<<artifact-root>>": '../dbgate-merged/app/dist'
|
||||
"<<channel>>": 'premium'
|
||||
"<<suffix>>": '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
|
||||
<<cd_merged>>
|
||||
node adjustPackageJson <<adjust>>
|
||||
- name: setUpdaterChannel <<channel>>
|
||||
_if: _channel
|
||||
run: |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
node setUpdaterChannel premium
|
||||
<<cd_merged>>
|
||||
node setUpdaterChannel <<channel>>
|
||||
- name: yarn set timeout
|
||||
run: |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
<<cd_merged>>
|
||||
yarn config set network-timeout 100000
|
||||
- name: yarn install
|
||||
run: |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
<<cd_merged>>
|
||||
yarn install
|
||||
- name: setCurrentVersion
|
||||
run: |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
<<cd_merged>>
|
||||
yarn setCurrentVersion
|
||||
- name: printSecrets
|
||||
run: |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
<<cd_merged>>
|
||||
yarn printSecrets
|
||||
env:
|
||||
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
|
||||
- name: fillPackagedPlugins
|
||||
run: |
|
||||
cd ..
|
||||
cd dbgate-merged
|
||||
<<cd_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
|
||||
<<cd_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 <<artifact-root>>/*.deb artifacts/dbgate-<<suffix>>.deb || true
|
||||
cp <<artifact-root>>/*x86*.AppImage artifacts/dbgate-<<suffix>>.AppImage || true
|
||||
cp <<artifact-root>>/*arm64*.AppImage artifacts/dbgate-<<suffix>>-arm64.AppImage || true
|
||||
cp <<artifact-root>>/*armv7l*.AppImage artifacts/dbgate-<<suffix>>-armv7l.AppImage || true
|
||||
cp <<artifact-root>>/*win*.exe artifacts/dbgate-<<suffix>>.exe || true
|
||||
cp <<artifact-root>>/*win_x64.zip artifacts/dbgate-windows-<<suffix>>.zip || true
|
||||
cp <<artifact-root>>/*win_arm64.zip artifacts/dbgate-windows-<<suffix>>-arm64.zip || true
|
||||
cp <<artifact-root>>/*-mac_universal.dmg artifacts/dbgate-<<suffix>>.dmg || true
|
||||
cp <<artifact-root>>/*-mac_x64.dmg artifacts/dbgate-<<suffix>>-x64.dmg || true
|
||||
cp <<artifact-root>>/*-mac_arm64.dmg artifacts/dbgate-<<suffix>>-arm64.dmg || true
|
||||
mv <<artifact-root>>/*.snap artifacts/dbgate-<<suffix>>.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 <<artifact-root>>/*.exe artifacts/ || true
|
||||
mv <<artifact-root>>/*.zip artifacts/ || true
|
||||
mv <<artifact-root>>/*.tar.gz artifacts/ || true
|
||||
mv <<artifact-root>>/*.AppImage artifacts/ || true
|
||||
mv <<artifact-root>>/*.deb artifacts/ || true
|
||||
mv <<artifact-root>>/*.snap artifacts/ || true
|
||||
mv <<artifact-root>>/*.dmg artifacts/ || true
|
||||
mv <<artifact-root>>/*.blockmap artifacts/ || true
|
||||
|
||||
mv ../dbgate-merged/app/dist/*.yml artifacts/ || true
|
||||
mv <<artifact-root>>/*.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: |
|
||||
<<cd_merged>>
|
||||
find . -type f -name "notarization-error.log" -exec echo "=== Start of {} ===" \; -exec cat {} \; -exec echo "=== End of {} ===" \;
|
||||
|
||||
Reference in New Issue
Block a user