-
Notifications
You must be signed in to change notification settings - Fork 24
89 lines (73 loc) · 2.47 KB
/
kilo-app-release.yml
File metadata and controls
89 lines (73 loc) · 2.47 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
name: kilo-app Release
on:
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
concurrency:
group: kilo-app-release
cancel-in-progress: false
permissions:
contents: write
jobs:
check-changes:
runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }}
outputs:
should_build: ${{ steps.check.outputs.should_build }}
steps:
- uses: useblacksmith/checkout@v1
with:
fetch-depth: 0
- name: Check for changes since last release
id: check
run: |
# Find the latest kilo-app release tag
LAST_TAG=$(git tag --list 'kilo-app-release/*' --sort=-creatordate | head -n 1)
if [ -z "$LAST_TAG" ]; then
echo "No previous release tag found — first build"
echo "should_build=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "Last release tag: $LAST_TAG"
# Check for changes in kilo-app or trpc since that tag
CHANGES=$(git diff --name-only "$LAST_TAG"..HEAD -- kilo-app/ packages/trpc/ pnpm-lock.yaml)
if [ -z "$CHANGES" ]; then
echo "No changes since $LAST_TAG — skipping build"
echo "should_build=false" >> "$GITHUB_OUTPUT"
else
echo "Changes detected since $LAST_TAG:"
echo "$CHANGES"
echo "should_build=true" >> "$GITHUB_OUTPUT"
fi
build-and-submit:
needs: check-changes
if: needs.check-changes.outputs.should_build == 'true' && github.ref == 'refs/heads/main'
runs-on: ${{ vars.RUNNER_DEFAULT_LABEL || 'ubuntu-latest' }}
timeout-minutes: 60
steps:
- uses: useblacksmith/checkout@v1
with:
lfs: true
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install EAS CLI
run: pnpm install --global eas-cli@latest
- name: Build and submit
working-directory: kilo-app
env:
EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
run: eas build --profile production --platform all --submit --non-interactive
- name: Tag release
run: |
TAG="kilo-app-release/$(date -u +%Y-%m-%d)-$(git rev-parse --short=7 HEAD)"
git tag "$TAG"
git push origin "$TAG"