-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (129 loc) · 4.99 KB
/
release.yml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Build release
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build-ios:
runs-on: macOS-14
steps:
- uses: actions/checkout@v4
- name: get-npm-version
id: package-version
uses: Saionaro/[email protected]
with:
path: packages/mobile
- name: Authenticate to Github packages
run: |
echo "@homebase-id:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Install npm dependencies
run: npm ci
# - name: Build libs
# run: npm run build:libs
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.4
bundler-cache: true
- name: Bump version
uses: yanamura/ios-bump-version@v1
with:
version: ${{ steps.package-version.outputs.version}}
build-number: ${{github.run_number}}
project-path: packages/mobile/ios
- name: setup-cocoapods
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.15.2
- name: Install Pods
run: pod install --repo-update
working-directory: packages/mobile/ios
- name: Build IOS App
uses: yukiarrr/[email protected]
with:
project-path: packages/mobile/ios/HomebaseFeed.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
mobileprovision-base64: |
${{ secrets.FEED_IOS_MOBILE_PROVISION_BASE64 }}
${{ secrets.FEED_APP_GROUP_IOS_MOBILE_PROVISION_BASE64 }}
code-signing-identity: 'iPhone Distribution'
team-id: ${{ secrets.IOS_TEAM_ID }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
workspace-path: packages/mobile/ios/HomebaseFeed.xcworkspace
scheme: HomebaseFeed
export-options: packages/mobile/ios/options.plist
- name: Rename output
run: mv output.ipa homebase-feed.ipa
- uses: actions/upload-artifact@v3
with:
name: homebase-feed-app-ios
path: homebase-feed.ipa
- name: Create Github Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
homebase-feed.ipa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get-npm-version
id: package-version
uses: Saionaro/[email protected]
with:
path: packages/mobile
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Bump version
uses: chkfung/[email protected]
with:
gradlePath: packages/mobile/android/app/build.gradle
versionCode: ${{github.run_number}}
versionName: ${{ steps.package-version.outputs.version }}
- name: Authenticate to Github packages
run: |
echo "@homebase-id:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Install npm dependencies
run: npm ci
# - name: Build libs
# run: npm run build:libs
- name: Decode Homebase Keystore to file
id: decode_keystore_file
env:
ENCODED_STRING: ${{ secrets.ANDROID_KEYSTORE_FILE_BASE64_ENCODED }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
KEYSTORE_FILE_PATH="${TMP_KEYSTORE_FILE_PATH}"/homebase.keystore
echo $ENCODED_STRING | base64 -di > "${KEYSTORE_FILE_PATH}"
echo "KEYSTORE_FILE_PATH=$KEYSTORE_FILE_PATH" >> $GITHUB_OUTPUT
- name: Build Android Bundle
run: cd packages/mobile/android && ./gradlew bundleRelease
env:
SIGNING_KEYSTORE_FILE_PATH: ${{ steps.decode_keystore_file.outputs.KEYSTORE_FILE_PATH }}
SIGNING_KEY_ALIAS: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
SIGNING_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_STORE_PASSWORD }}
SIGNING_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
- name: Rename output
run: mv packages/mobile/android/app/build/outputs/bundle/release/app-release.aab packages/mobile/android/app/build/outputs/bundle/release/homebase-feed.aab
- uses: actions/upload-artifact@v4
with:
name: homebase-feed-app-android
path: packages/mobile/android/app/build/outputs/bundle/release/homebase-feed.aab
- name: Create Github Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
packages/mobile/android/app/build/outputs/bundle/release/homebase-feed.aab
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}