Skip to content

Commit 46f6483

Browse files
Richardclaude
andcommitted
chore: add README, GitHub Actions CI, and repo topics
README: - Full API docs for all three usage styles (hook, imperative, legacy) - Platform requirements, installation steps (Expo + bare RN) - Android notification config, exact alarm permission guide - Architecture diagrams for how background execution works on each platform - Persistence guide — how to check on relaunch - Types reference - Contributing guide CI (.github/workflows/ci.yml): - Typecheck & Lint job (ubuntu-latest, Node 20) - Build job — verifies commonjs/module/typescript outputs - Android job — validates Kotlin compiles (skips gracefully if no Gradle wrapper) - iOS job — pod spec lint on macos-latest Repo: - 10 GitHub Topics set via API Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a257c71 commit 46f6483

2 files changed

Lines changed: 525 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
# ── Typecheck + Lint ──────────────────────────────────────────────────────
15+
typecheck:
16+
name: Typecheck & Lint
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: yarn
28+
29+
- name: Install dependencies
30+
run: yarn install --frozen-lockfile
31+
32+
- name: Typecheck
33+
run: yarn typecheck
34+
35+
- name: Lint
36+
run: yarn lint
37+
38+
# ── Build (verify the package compiles) ──────────────────────────────────
39+
build:
40+
name: Build Package
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
47+
- name: Setup Node
48+
uses: actions/setup-node@v4
49+
with:
50+
node-version: 20
51+
cache: yarn
52+
53+
- name: Install dependencies
54+
run: yarn install --frozen-lockfile
55+
56+
- name: Build
57+
run: yarn build
58+
59+
- name: Check lib output
60+
run: |
61+
echo "── CommonJS ──"
62+
ls lib/commonjs/
63+
echo "── ESM ──"
64+
ls lib/module/
65+
echo "── Types ──"
66+
ls lib/typescript/src/
67+
68+
# ── Android build check ───────────────────────────────────────────────────
69+
android:
70+
name: Android Build Check
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v4
76+
77+
- name: Setup Java
78+
uses: actions/setup-java@v4
79+
with:
80+
distribution: temurin
81+
java-version: 17
82+
83+
- name: Setup Node
84+
uses: actions/setup-node@v4
85+
with:
86+
node-version: 20
87+
cache: yarn
88+
89+
- name: Install dependencies
90+
run: yarn install --frozen-lockfile
91+
92+
- name: Validate Kotlin files compile
93+
working-directory: android
94+
run: |
95+
# Check Gradle wrapper is present; if not, just validate syntax
96+
if [ -f gradlew ]; then
97+
./gradlew compileDebugKotlin --no-daemon
98+
else
99+
echo "No Gradle wrapper in library — skipping compile (host app builds this)"
100+
fi
101+
102+
# ── iOS podspec validation ────────────────────────────────────────────────
103+
ios:
104+
name: iOS Podspec Lint
105+
runs-on: macos-latest
106+
107+
steps:
108+
- name: Checkout
109+
uses: actions/checkout@v4
110+
111+
- name: Setup Node
112+
uses: actions/setup-node@v4
113+
with:
114+
node-version: 20
115+
cache: yarn
116+
117+
- name: Install dependencies
118+
run: yarn install --frozen-lockfile
119+
120+
- name: Install CocoaPods
121+
run: gem install cocoapods --no-document
122+
123+
- name: Lint podspec
124+
run: |
125+
pod spec lint ios/background-timer.podspec \
126+
--allow-warnings \
127+
--skip-import-validation \
128+
--no-clean

0 commit comments

Comments
 (0)