-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (123 loc) · 4.58 KB
/
release-beta-app.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
name: Release beta
on:
workflow_dispatch:
pull_request:
branches:
- develop
types: [closed]
env:
BUILD_NUMBER: ${{ github.run_number }}
# Used by https://github.com/Microsoft/fastlane-plugin-appcenter
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
APPCENTER_OWNER_NAME: ${{ secrets.APPCENTER_OWNER_NAME }}
APPCENTER_OWNER_TYPE: ${{ secrets.APPCENTER_OWNER_TYPE }}
jobs:
release_beta_ios:
name: iOS (beta)
environment: beta
runs-on: macos-14
if:
github.event_name == 'workflow_dispatch' || (startsWith(github.head_ref, 'release/') && github.event.pull_request.merged ==
true)
steps:
- name: Notarize Release Build
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
- uses: actions/checkout@v3
- uses: nyaa8/package-version@v1
name: Fetch current version
- name: Create .env file
run: |
touch .env
echo NODE_ENV=beta >> .env
echo REACT_NATIVE_APP_AUTH0_DOMAIN="${{ secrets.AUTH0_DOMAIN }}" >> .env
echo REACT_NATIVE_APP_AUTH0_AUDIENCE="${{ secrets.AUTH0_AUDIENCE }}" >> .env
echo REACT_NATIVE_APP_AUTH0_SCHEME="${{ secrets.AUTH0_SCHEME }}" >> .env
echo REACT_NATIVE_APP_AUTH0_CLIENT_ID="${{ secrets.AUTH0_CLIENT_ID }}" >> .env
echo REACT_NATIVE_APP_ENCRYPTION_KEY="${{ secrets.ENCRYPTION_KEY }}" >> .env
echo API_HOST="${{ secrets.API_HOST }}" >> .env
echo API_HOST_UITDATABANK="${{ secrets.API_HOST_UITDATABANK }}" >> .env
echo APP_NAME="${{ secrets.APP_NAME }}" >> .env
echo SENTRY_DSN="${{ secrets.SENTRY_DSN }}" >> .env
echo REACT_NATIVE_APP_VERSION_NR="${{ env.PACKAGE_VERSION }}" >> .env
cat .env
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Restore Pods cache
uses: actions/cache@v3
with:
path: |
ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install pods
run: cd ios && pod install
- run: fastlane ios_beta
release_beta_android:
name: Android (beta)
environment: beta
runs-on: macos-14
if:
github.event_name == 'workflow_dispatch' || (startsWith(github.head_ref, 'release/') && github.event.pull_request.merged ==
true)
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}
- uses: nyaa8/package-version@v1
name: Fetch current version
- name: Create .env file
run: |
touch .env
echo NODE_ENV=beta >> .env
echo REACT_NATIVE_APP_AUTH0_DOMAIN="${{ secrets.AUTH0_DOMAIN }}" >> .env
echo REACT_NATIVE_APP_AUTH0_AUDIENCE="${{ secrets.AUTH0_AUDIENCE }}" >> .env
echo REACT_NATIVE_APP_AUTH0_SCHEME="${{ secrets.AUTH0_SCHEME }}" >> .env
echo REACT_NATIVE_APP_AUTH0_CLIENT_ID="${{ secrets.AUTH0_CLIENT_ID }}" >> .env
echo REACT_NATIVE_APP_ENCRYPTION_KEY="${{ secrets.ENCRYPTION_KEY }}" >> .env
echo API_HOST="${{ secrets.API_HOST }}" >> .env
echo API_HOST_UITDATABANK="${{ secrets.API_HOST_UITDATABANK }}" >> .env
echo APP_NAME="${{ secrets.APP_NAME }}" >> .env
echo SENTRY_DSN="${{ secrets.SENTRY_DSN }}" >> .env
echo REACT_NATIVE_APP_VERSION_NR="${{ env.PACKAGE_VERSION }}" >> .env
cat .env
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: gradle
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- run: fastlane android_beta
create_release:
name: Create release
needs: [release_beta_ios, release_beta_android]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}
- uses: nyaa8/package-version@v1
name: Fetch current version
- name: Run latest-tag
uses: EndBug/latest-tag@latest
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
tag_name: ${{ env.PACKAGE_VERSION }}