dbgate/.github/workflows/build-app-beta.yaml

123 lines
3.8 KiB
YAML
Raw Normal View History

2021-05-27 13:46:21 +00:00
name: Electron app BETA
2021-01-23 09:33:20 +00:00
on:
push:
2021-04-23 19:04:06 +00:00
tags:
2021-01-23 09:37:44 +00:00
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
2021-01-23 09:33:20 +00:00
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
2021-01-23 09:33:20 +00:00
matrix:
2023-05-26 16:18:40 +00:00
os: [macos-12, windows-2022, ubuntu-22.04]
2022-04-14 11:48:52 +00:00
# os: [macOS-10.15]
2021-01-23 09:33:20 +00:00
steps:
- name: Context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
2021-09-28 06:15:08 +00:00
- uses: actions/checkout@v2
2021-01-23 09:33:20 +00:00
with:
fetch-depth: 1
2024-05-08 08:27:35 +00:00
- name: Use Node.js 18.x
2021-01-23 09:33:20 +00:00
uses: actions/setup-node@v1
with:
2024-05-08 08:27:35 +00:00
node-version: 18.x
- name: yarn adjustPackageJson
run: |
yarn adjustPackageJson
2024-09-05 09:52:53 +00:00
- name: setUpdaterChannel beta
run: |
node setUpdaterChannel beta
2023-01-28 15:32:55 +00:00
- name: yarn set timeout
run: |
yarn config set network-timeout 100000
2021-01-23 09:33:20 +00:00
- name: yarn install
run: |
yarn install
- name: setCurrentVersion
run: |
yarn setCurrentVersion
2024-05-24 12:18:57 +00:00
- name: printSecrets
run: |
yarn printSecrets
env:
GIST_UPLOAD_SECRET : ${{secrets.GIST_UPLOAD_SECRET}}
2021-01-23 09:33:20 +00:00
- name: fillNativeModulesElectron
run: |
yarn fillNativeModulesElectron
- name: fillPackagedPlugins
run: |
yarn fillPackagedPlugins
2021-01-23 10:02:56 +00:00
- name: Install Snapcraft
if: matrix.os == 'ubuntu-22.04'
2021-01-23 10:02:56 +00:00
uses: samuelmeuli/action-snapcraft@v1
2021-01-23 09:33:20 +00:00
- name: Publish
run: |
yarn run build:app
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} # token for electron publish
2022-04-14 12:47:29 +00:00
2022-11-12 18:43:20 +00:00
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
2022-11-12 17:11:42 +00:00
# WIN_CSC_LINK: ${{ secrets.WINCERT_CERTIFICATE }}
# WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_PASSWORD }}
2022-04-14 12:47:29 +00:00
2022-04-12 19:52:56 +00:00
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
2021-01-23 09:33:20 +00:00
2022-04-14 12:47:29 +00:00
APPLE_ID: ${{ secrets.APPLE_ID }}
2024-05-08 05:46:28 +00:00
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
2022-04-14 12:47:29 +00:00
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
2021-01-23 10:02:56 +00:00
- name: publishSnap
if: matrix.os == 'ubuntu-22.04'
2021-01-23 10:02:56 +00:00
run: |
snapcraft upload --release=beta app/dist/*.snap
2023-01-28 12:45:43 +00:00
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
2021-01-23 10:02:56 +00:00
2021-01-23 09:33:20 +00:00
- name: Copy artifacts
run: |
mkdir artifacts
2021-04-24 11:12:00 +00:00
cp app/dist/*.deb artifacts/dbgate-beta.deb || true
2021-05-22 07:28:21 +00:00
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
2021-09-16 11:03:56 +00:00
cp app/dist/*win*.exe artifacts/dbgate-beta.exe || true
2021-09-16 09:36:34 +00:00
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
2022-01-25 19:11:59 +00:00
cp app/dist/*-mac_x64.dmg artifacts/dbgate-beta.dmg || true
2021-05-23 19:41:36 +00:00
cp app/dist/*-mac_arm64.dmg artifacts/dbgate-beta-arm64.dmg || true
2021-04-24 11:12:00 +00:00
2021-01-23 09:33:20 +00:00
mv app/dist/*.exe artifacts/ || true
2021-04-24 07:12:30 +00:00
mv app/dist/*.zip artifacts/ || true
2024-05-10 12:04:35 +00:00
mv app/dist/*.tar.gz artifacts/ || true
2021-01-23 09:33:20 +00:00
mv app/dist/*.AppImage artifacts/ || true
mv app/dist/*.deb artifacts/ || true
2021-01-23 10:02:56 +00:00
mv app/dist/*.snap artifacts/ || true
2021-04-23 19:01:58 +00:00
mv app/dist/*.dmg artifacts/ || true
2021-01-23 09:33:20 +00:00
2024-09-05 09:52:53 +00:00
mv app/dist/*.yml artifacts/ || true
rm artifacts/builder-debug.yml
2021-01-23 09:33:20 +00:00
- name: Upload artifacts
uses: actions/upload-artifact@v1
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 }}