mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
197 lines
6.7 KiB
YAML
197 lines
6.7 KiB
YAML
# --------------------------------------------------------------------------------------------
|
|
# This file is generated. Do not edit manually
|
|
# --------------------------------------------------------------------------------------------
|
|
name: Electron app PREMIUM
|
|
'on':
|
|
push:
|
|
tags:
|
|
- v[0-9]+.[0-9]+.[0-9]+
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
environment: dbgate-app
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
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
|
|
ref: 4401bfe2a52019448fd14a999eb26bc4e7b5341f
|
|
- 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: fillPackagedPlugins
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
|
|
yarn fillPackagedPlugins
|
|
- name: Publish Windows
|
|
if: matrix.os == 'windows-2022'
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
|
|
yarn run build:app
|
|
- name: Publish MacOS
|
|
if: matrix.os == 'macos-14'
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
|
|
yarn run build:app
|
|
env:
|
|
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: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
|
|
yarn run build:app
|
|
env:
|
|
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
|
|
- 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: ../dbgate-merged/app/dist
|
|
files-folder-filter: exe
|
|
timestamp-rfc3161: http://timestamp.acs.microsoft.com
|
|
timestamp-digest: SHA256
|
|
- name: Fix YML hashes
|
|
if: matrix.os == 'windows-2022'
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
|
|
yarn run fixYmlHashes
|
|
- name: Copy artifacts
|
|
run: |
|
|
mkdir artifacts
|
|
|
|
cp ../dbgate-merged/app/dist/*.deb artifacts/dbgate-premium-latest.deb || true
|
|
cp ../dbgate-merged/app/dist/*x86*.AppImage artifacts/dbgate-premium-latest.AppImage || true
|
|
cp ../dbgate-merged/app/dist/*arm64*.AppImage artifacts/dbgate-premium-latest-arm64.AppImage || true
|
|
cp ../dbgate-merged/app/dist/*armv7l*.AppImage artifacts/dbgate-premium-latest-armv7l.AppImage || true
|
|
cp ../dbgate-merged/app/dist/*win*.exe artifacts/dbgate-premium-latest.exe || true
|
|
cp ../dbgate-merged/app/dist/*win_x64.zip artifacts/dbgate-windows-premium-latest.zip || true
|
|
cp ../dbgate-merged/app/dist/*win_arm64.zip artifacts/dbgate-windows-premium-latest-arm64.zip || true
|
|
cp ../dbgate-merged/app/dist/*win_arm64.exe artifacts/dbgate-windows-premium-latest-arm64.exe || 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/*.snap artifacts/dbgate-premium-latest.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/*.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: false
|
|
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 {} ===" \;
|