|
2 | 2 | # Due to this extra care must be taken to only ever run all build_* scripts against the same branch to ensure |
3 | 3 | # the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch. |
4 | 4 | on: |
5 | | - workflow_call: |
6 | | - inputs: |
7 | | - sqlcipher: |
8 | | - type: string |
9 | | - required: true |
10 | | - description: "How to link sqlcipher, one of 'system' | 'static'" |
| 5 | + workflow_call: |
| 6 | + inputs: |
| 7 | + sqlcipher: |
| 8 | + type: string |
| 9 | + required: true |
| 10 | + description: "How to link sqlcipher, one of 'system' | 'static'" |
11 | 11 | jobs: |
12 | | - build: |
13 | | - runs-on: ubuntu-latest |
14 | | - steps: |
15 | | - - uses: actions/checkout@v3 |
| 12 | + build: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v3 |
16 | 16 |
|
17 | | - - uses: actions/download-artifact@v3 |
18 | | - with: |
19 | | - name: webapp |
| 17 | + - uses: actions/download-artifact@v3 |
| 18 | + with: |
| 19 | + name: webapp |
20 | 20 |
|
21 | | - - name: Cache .hak |
22 | | - id: cache |
23 | | - uses: actions/cache@v3 |
24 | | - with: |
25 | | - key: ${{ runner.os }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }} |
26 | | - path: | |
27 | | - ./.hak |
| 21 | + - name: Cache .hak |
| 22 | + id: cache |
| 23 | + uses: actions/cache@v3 |
| 24 | + with: |
| 25 | + key: ${{ runner.os }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }} |
| 26 | + path: | |
| 27 | + ./.hak |
28 | 28 |
|
29 | | - - name: Install Rust |
30 | | - if: steps.cache.outputs.cache-hit != 'true' |
31 | | - uses: actions-rs/toolchain@v1 |
32 | | - with: |
33 | | - toolchain: stable |
| 29 | + - name: Install Rust |
| 30 | + if: steps.cache.outputs.cache-hit != 'true' |
| 31 | + uses: actions-rs/toolchain@v1 |
| 32 | + with: |
| 33 | + toolchain: stable |
34 | 34 |
|
35 | | - - name: Install libsqlcipher-dev |
36 | | - if: steps.cache.outputs.cache-hit != 'true' && inputs.sqlcipher == 'system' |
37 | | - run: sudo apt-get install -y libsqlcipher-dev |
| 35 | + - name: Install libsqlcipher-dev |
| 36 | + if: steps.cache.outputs.cache-hit != 'true' && inputs.sqlcipher == 'system' |
| 37 | + run: sudo apt-get install -y libsqlcipher-dev |
38 | 38 |
|
39 | | - - uses: actions/setup-node@v3 |
40 | | - with: |
41 | | - cache: "yarn" |
| 39 | + - uses: actions/setup-node@v3 |
| 40 | + with: |
| 41 | + cache: "yarn" |
42 | 42 |
|
43 | | - # Does not need branch matching as only analyses this layer |
44 | | - - name: Install Deps |
45 | | - run: "yarn install --pure-lockfile" |
| 43 | + # Does not need branch matching as only analyses this layer |
| 44 | + - name: Install Deps |
| 45 | + run: "yarn install --pure-lockfile" |
46 | 46 |
|
47 | | - - name: Build Natives |
48 | | - if: steps.cache.outputs.cache-hit != 'true' |
49 | | - run: "yarn build:native" |
50 | | - env: |
51 | | - SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }} |
| 47 | + - name: Build Natives |
| 48 | + if: steps.cache.outputs.cache-hit != 'true' |
| 49 | + run: "yarn build:native" |
| 50 | + env: |
| 51 | + SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }} |
52 | 52 |
|
53 | | - - name: Build App |
54 | | - run: "yarn build --publish never -l" |
| 53 | + - name: Build App |
| 54 | + run: "yarn build --publish never -l" |
55 | 55 |
|
56 | | - - name: Install .deb |
57 | | - run: "sudo apt install ./dist/*.deb" |
| 56 | + - name: Install .deb |
| 57 | + run: "sudo apt install ./dist/*.deb" |
58 | 58 |
|
59 | | - - name: Upload Artifacts |
60 | | - uses: actions/upload-artifact@v3 |
61 | | - with: |
62 | | - name: linux-sqlcipher-${{ inputs.sqlcipher }} |
63 | | - path: dist |
64 | | - retention-days: 1 |
| 59 | + - name: Upload Artifacts |
| 60 | + uses: actions/upload-artifact@v3 |
| 61 | + with: |
| 62 | + name: linux-sqlcipher-${{ inputs.sqlcipher }} |
| 63 | + path: dist |
| 64 | + retention-days: 1 |
0 commit comments