-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
65 changed files
with
17,420 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BUNDLE_PATH: "vendor/bundle" | ||
BUNDLE_FORCE_RUBY_PLATFORM: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
root: true, | ||
extends: '@react-native', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# ios-build: | ||
# environment: development | ||
# name: iOS development build | ||
# runs-on: [self-hosted, 'macOS'] | ||
# steps: | ||
# - name: Cancel previous runs | ||
# uses: styfle/[email protected] | ||
# - name: Checkout repo from dev branch | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# ref: initial | ||
# - name: create-json | ||
# id: add-firebase-credentials | ||
# uses: jsdaniell/[email protected] | ||
# with: | ||
# name: 'wildlife-watcher-service-account.json' | ||
# json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} | ||
# dir: './fastlane' | ||
# - name: Copy Provisioning certificate | ||
# run: echo -n "${{ secrets.IOS_CERT_PROVISION }}" | base64 --decode > ./fastlane/profile.mobileprovision | ||
# - name: Copy private key | ||
# run: echo -n "${{ secrets.IOS_CERT_PRIVATE_KEY }}" | base64 --decode > ./fastlane/cert.p12 | ||
# - name: Copy Google Services plist file | ||
# run: echo -n "${{ secrets.IOS_GOOGLE_SERVICES_PLIST }}" | base64 --decode > ./ios/GoogleService-Info.plist | ||
# - name: Install npm dependency | ||
# run: npm install | ||
# - name: Install bundler | ||
# run: gem install bundler -v 2.4.10 | ||
# - name: Install gem plugins | ||
# run: bundle install | ||
# - name: Cache cocoapods | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /ios/Pods | ||
# key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-pods- | ||
# - name: Install dependencies with CocoaPods | ||
# run: cd ios && bundle exec pod install && cd .. | ||
# - name: Run fastlane | ||
# run: bundle exec fastlane ios build_debug | ||
# env: | ||
# IOS_CERT_PASSWORD: ${{ secrets.IOS_CERT_PASSWORD }} | ||
android-build: | ||
environment: development | ||
name: Android development build | ||
runs-on: ubuntu-latest | ||
container: | ||
image: reactnativecommunity/react-native-android | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
- name: Checkout repo from dev branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: initial | ||
- name: create-json | ||
id: add-firebase-credentials | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: 'wildlife-watcher-service-account.json' | ||
json: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }} | ||
dir: './fastlane' | ||
- name: create-json | ||
id: add-android-credentials | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: 'google-services.json' | ||
json: ${{ secrets.ANDROID_GOOGLE_SERVICES_JSON }} | ||
dir: './android/app' | ||
- name: Copy keystore file | ||
run: echo -n "${{ secrets.ANDROID_RELEASE_KEYSTORE }}" | base64 --decode > ./keystores/release.keystore | ||
- name: Copy keystore properties file | ||
run: echo -n "${{ secrets.ANDROID_RELEASE_KEYSTORE_PROPS }}" | base64 --decode > ./keystores/release.keystore.properties | ||
- name: Install npm dependency | ||
run: npm install | ||
- name: Install bundler | ||
run: | | ||
gem install bundler -v 2.4.10 | ||
- name: Install gem plugins | ||
run: | | ||
bundle install | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Run fastlane | ||
run: | | ||
bundle exec fastlane android build_release | ||
env: | ||
APP_VERSION: '0.0.1' | ||
APP_CODE_VERSION: ${{ github.run_id }} | ||
APP_ID: ${{ secrets.APP_ID }} | ||
ANDROID_ARTEFACT_PATH: ${{ secrets.ANDROID_ARTEFACT_PATH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# OSX | ||
# | ||
.DS_Store | ||
actions-runner | ||
.env* | ||
service-account.json | ||
google-services.json | ||
GoogleService-Info.plist | ||
*.keystore | ||
|
||
# Xcode | ||
# | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
xcuserdata | ||
*.xccheckout | ||
*.moved-aside | ||
DerivedData | ||
*.hmap | ||
*.ipa | ||
*.xcuserstate | ||
ios/.xcode.env.local | ||
|
||
# Android/IntelliJ | ||
# | ||
build/ | ||
.idea | ||
.gradle | ||
local.properties | ||
*.iml | ||
*.hprof | ||
.cxx/ | ||
*.keystore | ||
*.keystore.properties | ||
!debug.keystore.properties | ||
!debug.keystore | ||
|
||
# node.js | ||
# | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# fastlane | ||
# | ||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the | ||
# screenshots whenever they are needed. | ||
# For more information about the recommended setup visit: | ||
# https://docs.fastlane.tools/best-practices/source-control/ | ||
|
||
**/fastlane/report.xml | ||
**/fastlane/Preview.html | ||
**/fastlane/screenshots | ||
**/fastlane/test_output | ||
|
||
# Bundle artifact | ||
*.jsbundle | ||
|
||
# Ruby / CocoaPods | ||
/ios/Pods/ | ||
/ios/ipa/ | ||
/ios/logs/ | ||
/vendor/bundle/ | ||
|
||
# Temporary files created by Metro to check the health of the file watcher | ||
.metro-health-check* | ||
|
||
# testing | ||
/coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
arrowParens: 'avoid', | ||
bracketSameLine: true, | ||
bracketSpacing: false, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
/** | ||
* Sample React Native App | ||
* https://github.com/facebook/react-native | ||
* | ||
* @format | ||
*/ | ||
|
||
import React from 'react'; | ||
import type {PropsWithChildren} from 'react'; | ||
import { | ||
SafeAreaView, | ||
ScrollView, | ||
StatusBar, | ||
StyleSheet, | ||
Text, | ||
useColorScheme, | ||
View, | ||
} from 'react-native'; | ||
|
||
import { | ||
Colors, | ||
DebugInstructions, | ||
Header, | ||
LearnMoreLinks, | ||
ReloadInstructions, | ||
} from 'react-native/Libraries/NewAppScreen'; | ||
|
||
type SectionProps = PropsWithChildren<{ | ||
title: string; | ||
}>; | ||
|
||
function Section({children, title}: SectionProps): React.JSX.Element { | ||
const isDarkMode = useColorScheme() === 'dark'; | ||
return ( | ||
<View style={styles.sectionContainer}> | ||
<Text | ||
style={[ | ||
styles.sectionTitle, | ||
{ | ||
color: isDarkMode ? Colors.white : Colors.black, | ||
}, | ||
]}> | ||
{title} | ||
</Text> | ||
<Text | ||
style={[ | ||
styles.sectionDescription, | ||
{ | ||
color: isDarkMode ? Colors.light : Colors.dark, | ||
}, | ||
]}> | ||
{children} | ||
</Text> | ||
</View> | ||
); | ||
} | ||
|
||
function App(): React.JSX.Element { | ||
const isDarkMode = useColorScheme() === 'dark'; | ||
|
||
const backgroundStyle = { | ||
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, | ||
}; | ||
|
||
return ( | ||
<SafeAreaView style={backgroundStyle}> | ||
<StatusBar | ||
barStyle={isDarkMode ? 'light-content' : 'dark-content'} | ||
backgroundColor={backgroundStyle.backgroundColor} | ||
/> | ||
<ScrollView | ||
contentInsetAdjustmentBehavior="automatic" | ||
style={backgroundStyle}> | ||
<Header /> | ||
<View | ||
style={{ | ||
backgroundColor: isDarkMode ? Colors.black : Colors.white, | ||
}}> | ||
<Section title="Step One"> | ||
Edit <Text style={styles.highlight}>App.tsx</Text> to change this | ||
screen and then come back to see your edits. | ||
</Section> | ||
<Section title="See Your Changes"> | ||
<ReloadInstructions /> | ||
</Section> | ||
<Section title="Debug"> | ||
<DebugInstructions /> | ||
</Section> | ||
<Section title="Learn More"> | ||
Read the docs to discover what to do next: | ||
</Section> | ||
<LearnMoreLinks /> | ||
</View> | ||
</ScrollView> | ||
</SafeAreaView> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
sectionContainer: { | ||
marginTop: 32, | ||
paddingHorizontal: 24, | ||
}, | ||
sectionTitle: { | ||
fontSize: 24, | ||
fontWeight: '600', | ||
}, | ||
sectionDescription: { | ||
marginTop: 8, | ||
fontSize: 18, | ||
fontWeight: '400', | ||
}, | ||
highlight: { | ||
fontWeight: '700', | ||
}, | ||
}); | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
source 'https://rubygems.org' | ||
|
||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version | ||
ruby ">= 2.6.10" | ||
|
||
gem 'cocoapods', '~> 1.13' | ||
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0' | ||
gem "fastlane" | ||
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') | ||
eval_gemfile(plugins_path) if File.exist?(plugins_path) |
Oops, something went wrong.