Skip to content

Add a CI workflow to build native apps #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/actions/install-android/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Android
description: Manage your Android environment
author: David Myers
inputs:
ndk-version:
description: The version of the Android NDK to install.
required: false
default: r26d
outputs:
ndk-path:
description: The Android NDK path.
value: ${{ steps.install-ndk.outputs.ndk-path }}
runs:
using: composite
steps:
- name: Install Java
uses: ./.github/actions/install-java
- name: Install Android SDK
uses: android-actions/setup-android@v3
- name: Install Android NDK
id: install-ndk
uses: nttld/setup-ndk@v1
with:
link-to-sdk: true
ndk-version: ${{ inputs.ndk-version }}
- name: Set the NDK_HOME environment variable
shell: bash
run: |
echo "NDK_HOME=${{ steps.install-ndk.outputs.ndk-path }}" >> $GITHUB_ENV
53 changes: 53 additions & 0 deletions .github/actions/install-certificates/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Certificates
description: Manage your signing certificates
author: David Myers
inputs:
certificate:
description: A base64-encoded signing certificate.
required: true
certificate-password:
description: The password for the signing certificate.
required: false
default:
certificate-regex:
description: A regular expression to match the signing certificate.
required: false
default: Apple Distribution
keychain:
description: The name of the keychain to create.
required: false
default: default.keychain
keychain-password:
description: The password for the keychain.
required: false
default: default-password
outputs:
certificate-id:
description: The ID of the imported certificate.
value: ${{ steps.export-certificate.outputs.certificate-id }}
runs:
using: composite
steps:
- name: Create keychain
shell: bash
run: |
security create-keychain -p "${{ inputs.keychain-password }}" ${{ inputs.keychain }}
security default-keychain -s ${{ inputs.keychain }}
security unlock-keychain -p "${{ inputs.keychain-password }}" ${{ inputs.keychain }}
security set-keychain-settings -lu ${{ inputs.keychain }}
security show-keychain-info ${{ inputs.keychain }}
- name: Import signing certificate
shell: bash
run: |
echo ${{ inputs.certificate }} | base64 --decode > certificate.p12
security import certificate.p12 -k ${{ inputs.keychain }} -P "${{ inputs.certificate-password }}" -T /usr/bin/codesign
security set-key-partition-list -S apple:,apple-tool:,codesign: -s -k "${{ inputs.keychain-password }}" ${{ inputs.keychain }}
security find-identity -v -p codesigning ${{ inputs.keychain }}
- name: Export certificate
id: export-certificate
shell: bash
run: |
set -x
MOBILE_CERT_INFO=$(security find-identity -v -p codesigning ${{ inputs.keychain }} | grep -E "${{ inputs.certificate-regex }}")
MOBILE_CERT_ID=$(echo "$MOBILE_CERT_INFO" | awk -F'"' '{print $2}')
echo "certificate-id=$MOBILE_CERT_ID" >> $GITHUB_OUTPUT
20 changes: 20 additions & 0 deletions .github/actions/install-java/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Java
description: Manage your Java environment
author: David Myers
inputs:
distribution:
description: The distribution of Java to install.
required: false
default: zulu
version:
description: The version of Java to install.
required: false
default: 17
runs:
using: composite
steps:
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: ${{ inputs.distribution }}
java-version: ${{ inputs.version }}
33 changes: 33 additions & 0 deletions .github/actions/install-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js
description: Manage your Node.js environment
author: David Myers
inputs:
version:
description: The version of Node.js to install.
required: false
default: 18
runs:
using: composite
steps:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.version }}
- name: Install PNPM
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Set PNPM store path
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
key: v1-${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: |
${{ env.STORE_PATH }}
restore-keys: v1-${{ runner.os }}-pnpm-store-
- name: Install project dependencies
shell: bash
run: pnpm install --shamefully-hoist
21 changes: 21 additions & 0 deletions .github/actions/install-rust/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Rust
description: Manage your Rust environment
author: David Myers
inputs:
targets:
description: The targets to install.
required: false
toolchain:
# https://rust-lang.github.io/rustup/concepts/toolchains.html
description: The toolchain to install. Defaults to stable.
required: false
default: stable
runs:
using: composite
steps:
- name: Install Rust
# https://github.com/crusty-pie/toolchain
uses: crusty-pie/toolchain@v1
with:
targets: ${{ inputs.targets }}
toolchain: ${{ inputs.toolchain }}
12 changes: 12 additions & 0 deletions .github/actions/install-tauri/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Tauri
description: Manage your Tauri environment
author: David Myers
runs:
using: composite
steps:
- name: Install Tauri dependencies
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y libappindicator3-dev librsvg2-dev libwebkit2gtk-4.1-dev patchelf
17 changes: 17 additions & 0 deletions .github/actions/install-xcode/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Xcode
description: Manage your Xcode environment
author: David Myers
inputs:
version:
description: The version of Xcode to install.
required: false
default: latest-stable
runs:
using: composite
steps:
- name: Install Xcode
if: runner.os == 'macOS'
# https://github.com/maxim-lobanov/setup-xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ inputs.version }}
Loading
Loading