Skip to content

Release version: Commit 5afe4d2168b5bfd1a9193052ba06eb70fd4dab4d #30

Release version: Commit 5afe4d2168b5bfd1a9193052ba06eb70fd4dab4d

Release version: Commit 5afe4d2168b5bfd1a9193052ba06eb70fd4dab4d #30

name: Build release
run-name: 'Release version: Commit ${{ github.sha }}'
permissions:
contents: write
on:
push:
branches:
- master
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: false
isAutoUpdateDisabled:
description: 'Is auto-update disabled (true / 1)?'
required: false
isBfxApiStaging:
description: 'Is it necessary to use BFX API Staging? (true / 1)?'
required: false
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
jobs:
linux-win-docker-builder:
timeout-minutes: 90
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set repo owner
run: |
sed -i -e \
"s/owner: '.*'/owner: '${{ github.repository_owner }}'/g" \
"./electron-builder-config.js"
- if: github.event.inputs.version != ''
name: Set release version
run: |
sed -i -e \
"s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.version }}\"/g" \
"./package.json"
- if: contains(fromJson('["true", "1", true, 1]'), github.event.inputs.isAutoUpdateDisabled)
name: Turn off auto-update
run: |
echo "IS_AUTO_UPDATE_DISABLED=1" >> $GITHUB_ENV
- if: contains(fromJson('["true", "1", true, 1]'), github.event.inputs.isBfxApiStaging)
name: Use BFX API Staging for queries
run: |
echo "IS_BFX_API_STAGING=1" >> $GITHUB_ENV
- name: Cache Electron binaries
id: electron-cache
uses: actions/cache@v3
env:
cache-name: electron-cache-v1
with:
path: |
~/.cache/electron
~/.cache/electron-builder
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Build release
id: release-builder
uses: nick-fields/retry@v2
continue-on-error: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
timeout_minutes: 20
retry_wait_seconds: 10
max_attempts: 3
retry_on: any
command: ./scripts/launch.sh -lwp
- name: Prepare cache folders
run: |
sudo chown -R $(id -u):$(id -g) ~/.cache/electron
sudo chown -R $(id -u):$(id -g) ~/.cache/electron-builder
mac-builder:
timeout-minutes: 90
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set repo owner
run: |
sed -i -e \
"s/owner: '.*'/owner: '${{ github.repository_owner }}'/g" \
"./electron-builder-config.js"
- if: github.event.inputs.version != ''
name: Set release version
run: |
sed -i -e \
"s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.version }}\"/g" \
"./package.json"
- if: contains(fromJson('["true", "1", true, 1]'), github.event.inputs.isAutoUpdateDisabled)
name: Turn off auto-update
run: |
echo "IS_AUTO_UPDATE_DISABLED=1" >> $GITHUB_ENV
- if: contains(fromJson('["true", "1", true, 1]'), github.event.inputs.isBfxApiStaging)
name: Use BFX API Staging for queries
run: |
echo "IS_BFX_API_STAGING=1" >> $GITHUB_ENV
- uses: actions/setup-node@v3
with:
node-version: 18.17.1
- name: Cache Electron binaries
id: electron-cache
uses: actions/cache@v3
env:
cache-name: electron-cache-v1
with:
path: |
~/Library/Caches/electron
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Build release
id: release-builder
uses: nick-fields/retry@v2
continue-on-error: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ELECTRON_CACHE: ~/Library/Caches/electron
with:
timeout_minutes: 20
retry_wait_seconds: 10
max_attempts: 3
retry_on: any
command: ./scripts/build-release.sh -mp