-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (112 loc) · 4.57 KB
/
Copy pathrelease-unix.yml
File metadata and controls
134 lines (112 loc) · 4.57 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: release-unix
# macOS + Linux + Android release packaging. Windows keeps its own pipeline
# at .github/workflows/release.yml — untouched, not affected by this file.
# Same tag trigger as release.yml so one tag push fires both workflows and
# all jobs upload to the same GitHub Release.
on:
push:
tags: ["20*.*.*"]
jobs:
build-macos:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
# data/bible.db and the wav clips referenced by data/voices.json are
# tracked in git (explicit exceptions in .gitignore) — a plain
# checkout is enough, no separate data-fetch step needed.
- name: Install GTK4/SQLite3 deps
run: brew install gtk4 pango cairo glib sqlite3
- name: Install Zig (pinned master nightly)
run: |
set -euo pipefail
case "$(uname -m)" in
arm64|aarch64) ZIG_TARGET="aarch64-macos" ;;
x86_64) ZIG_TARGET="x86_64-macos" ;;
*) echo "unsupported arch $(uname -m)" >&2; exit 1 ;;
esac
JSON="$(curl -fsSL https://ziglang.org/download/index.json)"
URL="$(echo "$JSON" | jq -r ".master[\"$ZIG_TARGET\"].tarball")"
echo "Installing zig from $URL"
curl -fsSL "$URL" -o "$RUNNER_TEMP/zig.tar.xz"
mkdir -p "$RUNNER_TEMP/zig"
tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP/zig" --strip-components=1
echo "$RUNNER_TEMP/zig" >> "$GITHUB_PATH"
- name: Verify zig
run: zig version
- name: Build macOS .app bundle
run: bash packaging/build-macos.sh
- name: Install create-dmg
run: brew install create-dmg
- name: Build macOS installer DMG
run: bash packaging/build-macos-dmg.sh
- name: Release
uses: softprops/action-gh-release@v2
with:
name: "${{ github.ref_name }}"
body: "macOS build (unsigned/ad-hoc-signed — see docs/PACKAGING.md for Gatekeeper caveat). Either double-click Metanoia-*.dmg and drag Metanoia.app to Applications, or unzip the tarball and run Metanoia.app directly."
files: |
dist/Metanoia-macos-*.tar.gz
dist/Metanoia-*.dmg
build-linux:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
# data/bible.db + referenced voice clips come from the checkout above
# (see the macOS job's comment); build-linux.sh still fails fast if
# data/bible.db is somehow missing.
- name: Install GTK4/SQLite3 deps
run: |
sudo apt-get update
sudo apt-get install -y libgtk-4-dev libsqlite3-dev pkg-config build-essential
- name: Install Zig (pinned master nightly)
run: |
set -euo pipefail
case "$(uname -m)" in
x86_64) ZIG_TARGET="x86_64-linux" ;;
aarch64|arm64) ZIG_TARGET="aarch64-linux" ;;
*) echo "unsupported arch $(uname -m)" >&2; exit 1 ;;
esac
JSON="$(curl -fsSL https://ziglang.org/download/index.json)"
URL="$(echo "$JSON" | jq -r ".master[\"$ZIG_TARGET\"].tarball")"
echo "Installing zig from $URL"
curl -fsSL "$URL" -o "$RUNNER_TEMP/zig.tar.xz"
mkdir -p "$RUNNER_TEMP/zig"
tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP/zig" --strip-components=1
echo "$RUNNER_TEMP/zig" >> "$GITHUB_PATH"
- name: Verify zig
run: zig version
- name: Build Linux tarball + .deb
run: bash packaging/build-linux.sh
- name: Release
uses: softprops/action-gh-release@v2
with:
name: "${{ github.ref_name }}"
body: "Linux build: universal tarball (with install.sh) + .deb for Debian/Ubuntu. See docs/PACKAGING.md."
files: |
dist/Metanoia-linux-*.tar.gz
dist/*.deb
build-android:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Build debug-signed APK
run: bash packaging/build-android.sh
- name: Release
uses: softprops/action-gh-release@v2
with:
name: "${{ github.ref_name }}"
body: "Android build is DEBUG-SIGNED (sideload only, not from the Play Store). See docs/PACKAGING.md for what a real signed release needs."
files: dist/metanoia-android-debug.apk