verbose #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CN_APP_SLUG: release-channels-demo | |
jobs: | |
draft: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: create draft release | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release draft ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} | |
build-desktop: | |
needs: draft | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: 🧰 Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Install stable toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
cache: true | |
- name: install Linux dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y webkit2gtk-4.1 | |
- name: Cache pnpm modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install NPM modules | |
run: pnpm install | |
- name: Install x86_64-apple-darwin for macOS and build Tauri binaries | |
if: matrix.os == 'macos-latest' | |
run: | | |
rustup target add x86_64-apple-darwin | |
# setup API key for notarization | |
echo "${{ secrets.APPLE_API_KEY }}" > $RUNNER_TEMP/AuthKey.p8 | |
# build separate apps for Intel and Apple Silicon | |
pnpm tauri build --target x86_64-apple-darwin | |
pnpm tauri build --target aarch64-apple-darwin | |
env: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE_BASE64 }} | |
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} | |
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY_ID }} | |
APPLE_API_KEY_PATH: "$RUNNER_TEMP/AuthKey.p8" | |
- name: build Tauri app for Windows and Linux | |
if: matrix.os != 'macos-latest' | |
run: pnpm tauri build | |
env: | |
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
- name: upload assets | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release upload ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} | |
build-android: | |
needs: draft | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Install stable toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
cache: true | |
- name: 🧰 Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Cache pnpm modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install NPM modules | |
run: pnpm install | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup Android NDK | |
uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r26d | |
link-to-sdk: true | |
- name: Build Android package | |
run: | | |
export NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }} | |
pnpm tauri android init | |
pnpm tauri android build | |
- name: Upload assets | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release upload ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} | |
build-ios: | |
needs: draft | |
permissions: | |
contents: write | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Install stable toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
cache: true | |
target: aarch64-apple-ios | |
- name: 🧰 Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Cache pnpm modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install NPM modules | |
run: pnpm install | |
- name: Build iOS package | |
run: | | |
# ensure we can recreate the iOS project (only if you have commited it) | |
# currently that's the only way to apply the certificate and mobile provision | |
# though Tauri will fix that soon | |
rm -rf src-tauri/gen/apple | |
pnpm tauri ios init | |
pnpm tauri ios build --export-method app-store-connect -vv | |
env: | |
IOS_MOBILE_PROVISION: ${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }} | |
IOS_CERTIFICATE: ${{ secrets.IOS_CERTIFICATE_BASE64 }} | |
IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} | |
- name: Upload assets | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release upload ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} | |
publish: | |
needs: [build-desktop, build-android, build-ios] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: publish release | |
uses: crabnebula-dev/[email protected] | |
with: | |
command: release publish ${{ env.CN_APP_SLUG }} --framework tauri | |
api-key: ${{ secrets.CN_API_KEY }} |