Improve workflow reuse (#452)

This commit is contained in:
Michael Telatynski
2022-11-14 11:09:07 +00:00
committed by GitHub
parent 1e6a3ceebd
commit d45b3aac65
5 changed files with 57 additions and 31 deletions
+8 -10
View File
@@ -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