-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (66 loc) · 2.65 KB
/
Copy pathrelease.yml
File metadata and controls
74 lines (66 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Build the Airwaves OS Flasher for macOS, Linux and Windows.
#
# This is a starting point (Phase 5 in docs/RESEARCH-PLAN.md). Signing /
# notarization and the auto-updater are marked with TODOs — wire the secrets in
# before publishing, since an unsigned disk-writing tool trips scary OS warnings.
name: build
on:
push:
tags: ["v*"]
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Linux system deps (Tauri)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev librsvg2-dev \
libayatana-appindicator3-dev build-essential curl wget file libssl-dev
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: pnpm/action-setup@v4
with: { version: 10 }
- uses: actions/setup-node@v4
with: { node-version: 20, cache: pnpm }
- run: pnpm install --frozen-lockfile
# Build the elevated helper and stage it as a Tauri sidecar
# (binaries/awflash-helper-<target-triple>[.exe]).
- name: Build + stage helper sidecar
shell: bash
run: |
cargo build --release -p awflash-helper --target ${{ matrix.target }}
mkdir -p src-tauri/binaries
BIN=target/${{ matrix.target }}/release/awflash-helper
EXT=""; [ "${{ matrix.os }}" = "windows-latest" ] && EXT=".exe"
cp "${BIN}${EXT}" "src-tauri/binaries/awflash-helper-${{ matrix.target }}${EXT}"
# TODO: add bundle.externalBin: ["binaries/awflash-helper"] to tauri.conf.json
# and the signing env below before a real release.
- uses: tauri-apps/tauri-action@v0
env:
# macOS signing/notarization:
# APPLE_CERTIFICATE / APPLE_CERTIFICATE_PASSWORD / APPLE_SIGNING_IDENTITY
# APPLE_API_ISSUER / APPLE_API_KEY / APPLE_API_KEY_PATH
# Windows: AZURE Trusted Signing creds
# Updater: TAURI_SIGNING_PRIVATE_KEY / TAURI_SIGNING_PRIVATE_KEY_PASSWORD
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --target ${{ matrix.target }}
tagName: ${{ github.ref_name }}
releaseName: "Airwaves OS Flasher ${{ github.ref_name }}"
releaseDraft: true