Skip to content

Commit 7bb448c

Browse files
committed
Add Tauri mobile builds to CI
1 parent 9583e8c commit 7bb448c

File tree

16 files changed

+555
-86
lines changed

16 files changed

+555
-86
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Android
2+
description: Manage your Android environment
3+
author: David Myers
4+
inputs:
5+
ndk-version:
6+
description: The version of the Android NDK to install.
7+
required: false
8+
default: r26d
9+
outputs:
10+
ndk-path:
11+
description: The Android NDK path.
12+
value: ${{ steps.install-ndk.outputs.ndk-path }}
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Install Java
17+
uses: ./.github/actions/install-java
18+
- name: Install Android SDK
19+
uses: android-actions/setup-android@v3
20+
- name: Install Android NDK
21+
id: install-ndk
22+
uses: nttld/setup-ndk@v1
23+
with:
24+
link-to-sdk: true
25+
ndk-version: ${{ inputs.ndk-version }}
26+
- name: Set the NDK_HOME environment variable
27+
shell: bash
28+
run: |
29+
echo "NDK_HOME=${{ steps.install-ndk.outputs.ndk-path }}" >> $GITHUB_ENV
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Certificates
2+
description: Manage your signing certificates
3+
author: David Myers
4+
inputs:
5+
certificate:
6+
description: A base64-encoded signing certificate.
7+
required: true
8+
certificate-password:
9+
description: The password for the signing certificate.
10+
required: false
11+
default:
12+
certificate-regex:
13+
description: A regular expression to match the signing certificate.
14+
required: false
15+
default: Apple Distribution
16+
keychain:
17+
description: The name of the keychain to create.
18+
required: false
19+
default: default.keychain
20+
keychain-password:
21+
description: The password for the keychain.
22+
required: false
23+
default: default-password
24+
outputs:
25+
certificate-id:
26+
description: The ID of the imported certificate.
27+
value: ${{ steps.export-certificate.outputs.certificate-id }}
28+
runs:
29+
using: composite
30+
steps:
31+
- name: Create keychain
32+
shell: bash
33+
run: |
34+
security create-keychain -p "${{ inputs.keychain-password }}" ${{ inputs.keychain }}
35+
security default-keychain -s ${{ inputs.keychain }}
36+
security unlock-keychain -p "${{ inputs.keychain-password }}" ${{ inputs.keychain }}
37+
security set-keychain-settings -lu ${{ inputs.keychain }}
38+
security show-keychain-info ${{ inputs.keychain }}
39+
- name: Import signing certificate
40+
shell: bash
41+
run: |
42+
echo ${{ inputs.certificate }} | base64 --decode > certificate.p12
43+
security import certificate.p12 -k ${{ inputs.keychain }} -P "${{ inputs.certificate-password }}" -T /usr/bin/codesign
44+
security set-key-partition-list -S apple:,apple-tool:,codesign: -s -k "${{ inputs.keychain-password }}" ${{ inputs.keychain }}
45+
security find-identity -v -p codesigning ${{ inputs.keychain }}
46+
- name: Export certificate
47+
id: export-certificate
48+
shell: bash
49+
run: |
50+
set -x
51+
MOBILE_CERT_INFO=$(security find-identity -v -p codesigning ${{ inputs.keychain }} | grep -E "${{ inputs.certificate-regex }}")
52+
MOBILE_CERT_ID=$(echo "$MOBILE_CERT_INFO" | awk -F'"' '{print $2}')
53+
echo "certificate-id=$MOBILE_CERT_ID" >> $GITHUB_OUTPUT
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Java
2+
description: Manage your Java environment
3+
author: David Myers
4+
inputs:
5+
distribution:
6+
description: The distribution of Java to install.
7+
required: false
8+
default: zulu
9+
version:
10+
description: The version of Java to install.
11+
required: false
12+
default: 17
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Install Java
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: ${{ inputs.distribution }}
20+
java-version: ${{ inputs.version }}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Node.js
2+
description: Manage your Node.js environment
3+
author: David Myers
4+
inputs:
5+
version:
6+
description: The version of Node.js to install.
7+
required: false
8+
default: 18
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: ${{ inputs.version }}
16+
- name: Install PNPM
17+
uses: pnpm/action-setup@v4
18+
with:
19+
run_install: false
20+
- name: Set PNPM store path
21+
shell: bash
22+
run: |
23+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
24+
- name: Setup pnpm cache
25+
uses: actions/cache@v4
26+
with:
27+
key: v1-${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
28+
path: |
29+
${{ env.STORE_PATH }}
30+
restore-keys: v1-${{ runner.os }}-pnpm-store-
31+
- name: Install project dependencies
32+
shell: bash
33+
run: pnpm install --shamefully-hoist
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Rust
2+
description: Manage your Rust environment
3+
author: David Myers
4+
inputs:
5+
targets:
6+
description: The targets to install.
7+
required: false
8+
toolchain:
9+
# https://rust-lang.github.io/rustup/concepts/toolchains.html
10+
description: The toolchain to install. Defaults to stable.
11+
required: false
12+
default: stable
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Install Rust
17+
# https://github.com/crusty-pie/toolchain
18+
uses: crusty-pie/toolchain@v1
19+
with:
20+
targets: ${{ inputs.targets }}
21+
toolchain: ${{ inputs.toolchain }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Tauri
2+
description: Manage your Tauri environment
3+
author: David Myers
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Install Tauri dependencies
8+
if: runner.os == 'Linux'
9+
shell: bash
10+
run: |
11+
sudo apt-get update
12+
sudo apt-get install -y libappindicator3-dev librsvg2-dev libwebkit2gtk-4.1-dev patchelf
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Xcode
2+
description: Manage your Xcode environment
3+
author: David Myers
4+
inputs:
5+
version:
6+
description: The version of Xcode to install.
7+
required: false
8+
default: latest-stable
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Install Xcode
13+
if: runner.os == 'macOS'
14+
# https://github.com/maxim-lobanov/setup-xcode
15+
uses: maxim-lobanov/setup-xcode@v1
16+
with:
17+
xcode-version: ${{ inputs.version }}

0 commit comments

Comments
 (0)