forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmobile-build.yml
More file actions
90 lines (77 loc) 路 2.71 KB
/
Copy pathmobile-build.yml
File metadata and controls
90 lines (77 loc) 路 2.71 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
90
name: Mobile Build
on:
push:
branches: [main, develop]
paths:
- 'Frontend/**'
pull_request:
branches: [main]
paths:
- 'Frontend/**'
workflow_dispatch:
inputs:
bump_version:
description: 'Version bump type (patch/minor/major)'
required: false
default: 'patch'
jobs:
build-android:
name: Build Android APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Bump version
if: github.event_name == 'workflow_dispatch'
run: bash infrastructure/ci/scripts/build-android.sh bump ${{ github.event.inputs.bump_version }}
- name: Build Android
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
run: bash infrastructure/ci/scripts/build-android.sh build
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: android-apk-${{ github.run_id }}
path: android/app/build/outputs/apk/release/*.apk
build-ios:
name: Build iOS IPA
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Bump version
if: github.event_name == 'workflow_dispatch'
run: bash infrastructure/ci/scripts/build-ios.sh bump ${{ github.event.inputs.bump_version }}
- name: Build iOS
env:
IOS_CERTIFICATE_BASE64: ${{ secrets.IOS_CERTIFICATE_BASE64 }}
IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
IOS_PROVISIONING_PROFILE_BASE64: ${{ secrets.IOS_PROVISIONING_PROFILE_BASE64 }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: bash infrastructure/ci/scripts/build-ios.sh build
- name: Upload to TestFlight
if: github.ref == 'refs/heads/main'
env:
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER_ID: ${{ secrets.APPLE_API_ISSUER_ID }}
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }}
run: bash infrastructure/ci/scripts/build-ios.sh upload
- name: Upload IPA artifact
uses: actions/upload-artifact@v4
with:
name: ios-ipa-${{ github.run_id }}
path: ios/build/*.ipa