Improve workflow reuse (#452)
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
sqlcipher:
|
||||
type: string
|
||||
required: true
|
||||
description: "How to link sqlcipher, one of 'system' | 'static'"
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- sqlcipher: system
|
||||
- sqlcipher: static
|
||||
static: 1
|
||||
name: '${{ matrix.sqlcipher }} sqlcipher'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -30,7 +28,7 @@ jobs:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install libsqlcipher-dev
|
||||
if: matrix.sqlcipher == 'system'
|
||||
if: inputs.sqlcipher == 'system'
|
||||
run: sudo apt-get install -y libsqlcipher-dev
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
@@ -44,7 +42,7 @@ jobs:
|
||||
- name: Build Natives
|
||||
run: "yarn build:native"
|
||||
env:
|
||||
SQLCIPHER_STATIC: ${{ matrix.static }}
|
||||
SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
|
||||
|
||||
- name: Build App
|
||||
run: "yarn build --publish never"
|
||||
@@ -55,6 +53,6 @@ jobs:
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: linux-sqlcipher-${{ matrix.sqlcipher }}
|
||||
name: linux-sqlcipher-${{ inputs.sqlcipher }}
|
||||
path: dist
|
||||
retention-days: 1
|
||||
|
||||
Reference in New Issue
Block a user