Skip to content

Commit 4d87840

Browse files
authored
Merge pull request #2 from OneNoted/release-0-3-0-prep
Prepare 0.3.0 release and split Linux/macOS distribution paths
2 parents 5d1f599 + 1150e75 commit 4d87840

71 files changed

Lines changed: 5860 additions & 901 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: macOS Preview
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
macos-preview:
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
runner:
16+
- macos-14
17+
- macos-15
18+
- macos-15-intel
19+
runs-on: ${{ matrix.runner }}
20+
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
28+
- name: Cache Rust artifacts
29+
uses: Swatinem/rust-cache@v2
30+
31+
- name: Install macOS build tools
32+
run: |
33+
brew update
34+
brew install xcodegen zig
35+
36+
- name: Run shared Rust validation
37+
run: |
38+
cargo test -p taskers-control -p taskers-core -p taskers-macos-ffi -p taskers-paths
39+
40+
- name: Confirm crates.io launcher is blocked on macOS
41+
run: |
42+
set +e
43+
output="$(cargo install --locked --path crates/taskers-launcher 2>&1)"
44+
status=$?
45+
set -e
46+
47+
printf '%s\n' "$output"
48+
49+
if [[ $status -eq 0 ]]; then
50+
echo "expected cargo install --path crates/taskers-launcher to fail on macOS" >&2
51+
exit 1
52+
fi
53+
54+
grep -F "taskers on crates.io currently supports x86_64 Linux only" <<<"$output"
55+
grep -F "Download the macOS DMG" <<<"$output"
56+
57+
- name: Generate Xcode project
58+
run: bash scripts/generate_macos_project.sh
59+
60+
- name: Build and test Taskers.app
61+
run: |
62+
mkdir -p build/macos
63+
set -o pipefail
64+
xcodebuild test \
65+
-project macos/Taskers.xcodeproj \
66+
-scheme TaskersMac \
67+
-configuration Debug \
68+
-derivedDataPath build/macos/DerivedData \
69+
-resultBundlePath build/macos/Taskers-${{ matrix.runner }}.xcresult \
70+
CODE_SIGNING_ALLOWED=NO \
71+
CODE_SIGNING_REQUIRED=NO \
72+
| tee build/macos/xcodebuild-test-${{ matrix.runner }}.log
73+
74+
- name: Sign debug app bundle
75+
run: bash scripts/sign_macos_app.sh build/macos/DerivedData build/macos/DerivedData/Build/Products/Debug/Taskers.app
76+
77+
- name: Smoke launch bundled app
78+
run: |
79+
APP_PATH="build/macos/DerivedData/Build/Products/Debug/Taskers.app"
80+
if [[ ! -d "${APP_PATH}" ]]; then
81+
echo "expected app bundle at ${APP_PATH}" >&2
82+
exit 1
83+
fi
84+
85+
TASKERS_SMOKE_TEST=1 \
86+
"${APP_PATH}/Contents/MacOS/Taskers"
87+
88+
- name: Package signed app
89+
if: always()
90+
run: |
91+
APP_PATH="build/macos/DerivedData/Build/Products/Debug/Taskers.app"
92+
if [[ -d "${APP_PATH}" ]]; then
93+
ditto -c -k --sequesterRsrc --keepParent \
94+
"${APP_PATH}" \
95+
"build/macos/Taskers-${{ matrix.runner }}.zip"
96+
fi
97+
98+
- name: Upload build artifacts
99+
if: always()
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: taskers-macos-${{ matrix.runner }}
103+
if-no-files-found: ignore
104+
path: |
105+
build/macos/Taskers-${{ matrix.runner }}.zip
106+
build/macos/Taskers-${{ matrix.runner }}.xcresult
107+
build/macos/xcodebuild-test-${{ matrix.runner }}.log
108+
build/macos/DerivedData/Logs/Build/*.xcactivitylog
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
name: Release Assets
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
linux-bundle:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Cache Rust artifacts
24+
uses: Swatinem/rust-cache@v2
25+
26+
- name: Install Linux bundle tools
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y zig xvfb libgtk-4-dev libadwaita-1-dev
30+
31+
- name: Build Linux bundle
32+
run: bash scripts/build_linux_bundle.sh
33+
34+
- name: Run Linux smoke checks
35+
run: |
36+
bash scripts/smoke_taskers_ui.sh
37+
bash scripts/smoke_taskers_focus_churn.sh
38+
bash scripts/smoke_linux_release_launcher.sh
39+
40+
- name: Upload Linux bundle
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: linux-bundle
44+
path: dist/taskers-linux-bundle-v*.tar.xz
45+
46+
macos-universal-dmg:
47+
runs-on: macos-15
48+
env:
49+
TASKERS_MACOS_CERTIFICATE_P12_BASE64: ${{ secrets.TASKERS_MACOS_CERTIFICATE_P12_BASE64 }}
50+
TASKERS_MACOS_CERTIFICATE_PASSWORD: ${{ secrets.TASKERS_MACOS_CERTIFICATE_PASSWORD }}
51+
TASKERS_MACOS_CODESIGN_IDENTITY: ${{ secrets.TASKERS_MACOS_CODESIGN_IDENTITY }}
52+
TASKERS_MACOS_NOTARY_APPLE_ID: ${{ secrets.TASKERS_MACOS_NOTARY_APPLE_ID }}
53+
TASKERS_MACOS_NOTARY_TEAM_ID: ${{ secrets.TASKERS_MACOS_NOTARY_TEAM_ID }}
54+
TASKERS_MACOS_NOTARY_PASSWORD: ${{ secrets.TASKERS_MACOS_NOTARY_PASSWORD }}
55+
56+
steps:
57+
- name: Check out repository
58+
uses: actions/checkout@v4
59+
60+
- name: Install Rust toolchain
61+
uses: dtolnay/rust-toolchain@stable
62+
63+
- name: Cache Rust artifacts
64+
uses: Swatinem/rust-cache@v2
65+
66+
- name: Install macOS build tools
67+
run: |
68+
brew update
69+
brew install xcodegen zig
70+
71+
- name: Validate macOS release credentials
72+
run: |
73+
missing=0
74+
for name in \
75+
TASKERS_MACOS_CERTIFICATE_P12_BASE64 \
76+
TASKERS_MACOS_CERTIFICATE_PASSWORD \
77+
TASKERS_MACOS_CODESIGN_IDENTITY \
78+
TASKERS_MACOS_NOTARY_APPLE_ID \
79+
TASKERS_MACOS_NOTARY_TEAM_ID \
80+
TASKERS_MACOS_NOTARY_PASSWORD; do
81+
if [[ -z "${!name:-}" ]]; then
82+
echo "::error::Missing required secret ${name}"
83+
missing=1
84+
fi
85+
done
86+
87+
if [[ $missing -ne 0 ]]; then
88+
exit 1
89+
fi
90+
91+
- name: Install Developer ID certificate
92+
run: bash scripts/install_macos_codesign_certificate.sh
93+
94+
- name: Generate Xcode project
95+
run: bash scripts/generate_macos_project.sh
96+
97+
- name: Build universal Taskers.app
98+
run: |
99+
xcodebuild build \
100+
-project macos/Taskers.xcodeproj \
101+
-scheme TaskersMac \
102+
-configuration Release \
103+
-derivedDataPath build/macos/DerivedData \
104+
ARCHS="arm64 x86_64" \
105+
ONLY_ACTIVE_ARCH=NO \
106+
CODE_SIGNING_ALLOWED=NO \
107+
CODE_SIGNING_REQUIRED=NO
108+
109+
- name: Sign universal Taskers.app
110+
run: bash scripts/sign_macos_app.sh
111+
112+
- name: Build universal DMG
113+
run: bash scripts/build_macos_dmg.sh
114+
115+
- name: Notarize and staple universal DMG
116+
run: |
117+
version="$(sed -n 's/^version = \"\\(.*\\)\"/\\1/p' Cargo.toml | head -n1)"
118+
bash scripts/notarize_macos_dmg.sh "dist/Taskers-v${version}-universal2.dmg"
119+
120+
- name: Upload universal DMG
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: macos-universal-dmg
124+
path: dist/Taskers-v*-universal2.dmg
125+
126+
release-manifest:
127+
needs:
128+
- linux-bundle
129+
runs-on: ubuntu-latest
130+
131+
steps:
132+
- name: Check out repository
133+
uses: actions/checkout@v4
134+
135+
- name: Download built assets
136+
uses: actions/download-artifact@v4
137+
with:
138+
path: dist
139+
140+
- name: Flatten downloaded artifacts
141+
run: |
142+
mkdir -p dist/release
143+
find dist -type f -exec cp {} dist/release/ \;
144+
145+
- name: Build release manifest
146+
run: python3 scripts/build_release_manifest.py --dist-dir dist/release
147+
148+
- name: Upload release manifest
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: release-manifest
152+
path: dist/release/taskers-manifest-v*.json
153+
154+
upload-github-release:
155+
if: startsWith(github.ref, 'refs/tags/v')
156+
needs:
157+
- release-manifest
158+
- macos-universal-dmg
159+
runs-on: ubuntu-latest
160+
161+
steps:
162+
- name: Download built assets
163+
uses: actions/download-artifact@v4
164+
with:
165+
path: dist
166+
167+
- name: Flatten downloaded artifacts
168+
run: |
169+
mkdir -p dist/release
170+
find dist -type f -exec cp {} dist/release/ \;
171+
172+
- name: Create draft GitHub release with assets
173+
uses: softprops/action-gh-release@v2
174+
with:
175+
draft: true
176+
files: |
177+
dist/release/taskers-manifest-v*.json
178+
dist/release/taskers-linux-bundle-v*.tar.xz
179+
dist/release/Taskers-v*-universal2.dmg

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
build/
12
dist/
3+
build/
4+
macos/Taskers.xcodeproj/

0 commit comments

Comments
 (0)