-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.42 KB
/
Copy pathcd-android.yml
File metadata and controls
84 lines (68 loc) · 2.42 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
name: Deploy to Play Store
on:
workflow_dispatch:
concurrency:
group: deploy-android
cancel-in-progress: false
permissions:
contents: write
jobs:
ci:
uses: ./.github/workflows/ci.yml
build:
needs: ci
environment: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-tags: true
- uses: actions/setup-node@v6
with:
node-version: 22
cache: 'npm'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Store readiness preflight
run: npm run check:store-ready
- name: Extract version
id: version
run: |
VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('app.json','utf8')).expo.version)")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Deploying v$VERSION"
- name: Version guard
run: |
if git rev-parse "v${{ steps.version.outputs.version }}-android" >/dev/null 2>&1; then
echo "::error::Tag v${{ steps.version.outputs.version }}-android already exists. Bump the version first: npm run version:patch"
exit 1
fi
- name: Validate secrets
env:
HAS_EXPO_TOKEN: ${{ secrets.EXPO_TOKEN != '' }}
run: |
if [ "$HAS_EXPO_TOKEN" != "true" ]; then
echo "::error::Missing required secret: EXPO_TOKEN — See docs/EXPO_SETUP.md"
exit 1
fi
- name: Setup Expo CLI
uses: expo/expo-github-action@c7b66a9c327a43a8fa7c0158e7f30d6040d2481e # v8
with:
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Build Android
run: eas build --platform android --profile production --non-interactive
- name: Submit to Play Store
run: eas submit --platform android --profile production --non-interactive
- name: Create GitHub Release
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3
with:
tag_name: v${{ steps.version.outputs.version }}-android
name: v${{ steps.version.outputs.version }} (Android)
body: |
## Play Store Deployment
- **Version:** ${{ steps.version.outputs.version }}
- **Platform:** Android
- **Track:** internal
- **Deployed by:** @${{ github.actor }}
generate_release_notes: true