Skip to content

Commit b349e83

Browse files
committed
Merge branch 'master' into chore/remove-env-files
2 parents b47a37d + fccce7b commit b349e83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+735
-507
lines changed

.github/workflows/sonar.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: SonarQube analysis
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
push:
7+
branches:
8+
- main
9+
- master
10+
- staging
11+
- qa
12+
- development
13+
14+
jobs:
15+
sonar:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: 📦 Checkout project repo
19+
uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
23+
- name: 📦 Setup Node + PNPM + install deps
24+
uses: ./.github/actions/setup-node-pnpm-install
25+
26+
- name: Run Tests
27+
run: export NODE_OPTIONS=--experimental-vm-modules && pnpm test:ci
28+
29+
- name: SonarQube Scan
30+
uses: sonarsource/sonarqube-scan-action@master
31+
env:
32+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
33+
SONAR_HOST_URL: ${{ secrets.SONAR_URL }}
34+
with:
35+
args: >
36+
-Dsonar.sonar.sources=./src
37+
-Dsonar.qualitygate.wait=true
38+
-Dsonar.projectBaseDir=.
39+
-Dsonar.verbose=false
40+
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT }}
41+
-Dsonar.sonar.sourceEncoding=UTF-8
42+
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
43+
-Dsonar.coverage.exclusions=**/storage/**,**/**.config.js,**/*.test.tsx,**/icons/**,**/docs/**,**/cli/**,**/__mocks__/**,**/android/**,**/ios/**

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ npm-debug.*
1111
web-build/
1212
yarn-error.log
1313
/coverage
14+
15+
.env.**
16+
17+
1418
# macOS
1519
.DS_Store
1620

EAS.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## Distribute using Expo Application Services
2+
3+
To be able to use Expo Application Services to upload your app to App Store and Google Play Store there are some configurations that need to be done on your side.
4+
5+
### Build from github actions
6+
7+
To be able to trigger the eas-build github action you will have to add the `EXPO_TOKEN` secret to the repo settings. This secret is a required access token for your Expo account. https://expo.dev/settings/access-tokens
8+
9+
### Submit to Google Play Store
10+
11+
The first submission of the app needs to be performed manually. Learn more: https://expo.fyi/first-android-submission. Only after having a valid version submitted you can submit automatically using EAS.
12+
13+
To submit an app to google play store you will have to follow the steps in [Uploading a Google Service Account Key for Play Store Submissions with EAS](https://github.com/expo/fyi/blob/main/creating-google-service-account.md) guide, its super detailed and should not take you much time.
14+
15+
Once you've completed the guide you'll be able to submit to the store your EAS builds using the following command:
16+
17+
`eas submit --platform android`
18+
19+
### Submit to AppStore
20+
21+
1. Ensure your credentials are configured correctly in EAS. You can do this by running the following command in your terminal:
22+
23+
`eas credentials`
24+
25+
Follow the prompts to authenticate and select your Apple Developer account.
26+
27+
When asked `What do you want to do?` select: `App Store Connect: Manage your API Key`.
28+
29+
<img width="793" alt="Screenshot 2024-07-31 at 6 09 59 PM" src="https://github.com/user-attachments/assets/c0403c6d-b151-4d74-9458-2b6fadd6cbf3">
30+
31+
In order to be able to Generate a new App Store Connect API Key it's important your user has the right permissions on the App Store Connect account. Make sure you have access to Cloud Managed Distribution Certificate, if you don't have this permission you'll get a `403 - Access forbidden response`.
32+
33+
![Screenshot 2024-07-31 at 5 34 56 PM](https://github.com/user-attachments/assets/890e1199-b4c6-4aed-9582-3122d40ee66a)
34+
35+
2. Build your app using Expo and EAS:
36+
37+
`eas build --platform ios`
38+
39+
This command initiates the build process for iOS using Expo Application Services.
40+
41+
3. Submit Your Build to the App Store
42+
Once your build is complete, you can submit it to the App Store using the following command:
43+
44+
`eas submit --platform ios`
45+
46+
This command will handle the submission of your build to the App Store using the credentials and configuration you provided.
47+
48+
### Additional Resources
49+
50+
For more detailed instructions on setting up your Apple Developer account, certificates, and provisioning profiles, refer to the [EAS Submits](https://docs.expo.dev/submit/introduction/) docs.

README-project.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ To run the app on Android
3737
pnpm android
3838
```
3939

40+
### SonarQube setup
41+
42+
SonarQube is an open-source platform for continuous inspection of code quality. It performs automatic reviews to detect bugs, code smells, and security vulnerabilities. Rootstrap has a SonarQube instance to improve the quality of the software we develop. On each PR, a GitHub Action is triggered to perform the analysis. To set up SonarQube correctly, you need to add the `SONAR_TOKEN`, `SONAR_URL`, and `SONAR_PROJECT` secrets to the repository. Additionally, you must select the quality gate named `ReactNativeTemplate` for your project on SonarQube. In case you're using this project outside Rootstrap and you're not planning to use SonarQube the sonar scanner [workflow](.github/workflows/sonar.yml) should be deleted.
43+
4044
## ✍️ Documentation
4145

4246
- [Rules and Conventions](https://starter.obytes.com/getting-started/rules-and-conventions/)
@@ -47,3 +51,4 @@ pnpm android
4751
- [Forms](https://starter.obytes.com/ui-and-theme/Forms)
4852
- [Data fetching](https://starter.obytes.com/guides/data-fetching)
4953
- [Contribute to starter](https://starter.obytes.com/how-to-contribute/)
54+
- [Distribute using EAS](/EAS.md)

android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ android {
8383
buildToolsVersion rootProject.ext.buildToolsVersion
8484
compileSdk rootProject.ext.compileSdkVersion
8585

86-
namespace 'com.obytes.development'
86+
namespace 'com.rs.mobile.development'
8787
defaultConfig {
88-
applicationId 'com.obytes.development'
88+
applicationId 'com.rs.mobile.development'
8989
minSdkVersion rootProject.ext.minSdkVersion
9090
targetSdkVersion rootProject.ext.targetSdkVersion
9191
versionCode 1
92-
versionName "6.1.0"
92+
versionName "1.0.1"
9393
}
9494
signingConfigs {
9595
debug {

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
<data android:scheme="obytesApp"/>
2828
<data android:scheme="com.obytes.development"/>
2929
<data android:scheme="exp+obytesapp"/>
30+
<data android:scheme="react-native-template"/>
31+
<data android:scheme="com.rs.mobile.development"/>
3032
</intent-filter>
3133
</activity>
3234
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>

android/app/src/main/java/com/obytes/development/MainActivity.kt renamed to android/app/src/main/java/com/rs/mobile/development/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.obytes.development
1+
package com.rs.mobile.development
22

33
import android.os.Build
44
import android.os.Bundle

android/app/src/main/java/com/obytes/development/MainApplication.kt renamed to android/app/src/main/java/com/rs/mobile/development/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.obytes.development
1+
package com.rs.mobile.development
22

33
import android.app.Application
44
import android.content.res.Configuration
-39 Bytes
Loading
-39 Bytes
Loading

0 commit comments

Comments
 (0)