-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.1 KB
/
Copy pathci.yml
File metadata and controls
71 lines (60 loc) · 2.1 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
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
check_if_release_commit:
runs-on: ubuntu-latest
outputs:
is_release: ${{ steps.check_tag.outputs.is_release }}
steps:
- name: Checkout code with tags
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches all history and tags
- name: Check if commit is tagged for release (v*)
id: check_tag
run: |
# Check if any tag starting with 'v' points to the current commit HEAD
if git tag --points-at HEAD | grep -q "^v"; then
echo "Commit is tagged with a 'v*' tag. Build/test steps will be skipped in this workflow."
echo "is_release=true" >> $GITHUB_OUTPUT
else
echo "Commit is NOT tagged with a 'v*' tag. Build/test steps will proceed."
echo "is_release=false" >> $GITHUB_OUTPUT
fi
shell: bash
android_build:
runs-on: ubuntu-latest
needs: check_if_release_commit
if: needs.check_if_release_commit.outputs.is_release == 'false'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Enable Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Install example app dependencies
run: nix develop .# --command bash -c "yarn install --immutable"
- name: Build example Android app
run: nix develop .# --command bash -c "yarn example build:android"
ios_build:
runs-on: macos-latest
needs: check_if_release_commit
if: needs.check_if_release_commit.outputs.is_release == 'false'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Enable Corepack
run: corepack enable
- name: Install example app dependencies
run: yarn install --immutable && yarn example ios:prebuild
- name: Build example iOS app
run: yarn example build:ios:xcode