Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions services/custom-example/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ const nextConfig = {
config.externals.push('pino-pretty', 'lokijs', 'encoding');
return config;
},
headers() {
return [
{
source: '/.well-known/apple-app-site-association',
headers: [
{
key: 'Content-Type',
value: 'application/json',
},
],
},
];
},
};

module.exports = nextConfig;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"webcredentials": {
"apps": ["<teamID>.<bundleID>"]
}
}
14 changes: 14 additions & 0 deletions services/custom-example/public/.well-known/assetlinks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.giano.app",
"sha256_cert_fingerprints": [
"00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00"
]
}
}
]
6 changes: 6 additions & 0 deletions services/react-native-web-browser/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
API_URL='http://192.168.1.115:4000'

## TODO: add the variable to your CI and remove it from here, not recommended setting sensitive values on your git repo
SECRET_KEY=my-secret-key
VAR_NUMBER=10 # this is a number variable
VAR_BOOL=true # this is a boolean variable
6 changes: 6 additions & 0 deletions services/react-native-web-browser/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
API_URL='http://192.168.1.115:4000'

## TODO: add the variable to your CI and remove it from here, not recommended setting sensitive values on your git repo
SECRET_KEY=my-secret-key
VAR_NUMBER=10 # this is a number variable
VAR_BOOL=true # this is a boolean variable
6 changes: 6 additions & 0 deletions services/react-native-web-browser/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
API_URL='http://192.168.1.115:4000'

## TODO: add the variable to your CI and remove it from here, not recommended setting sensitive values on your git repo
SECRET_KEY=my-secret-key
VAR_NUMBER=10 # this is a number variable
VAR_BOOL=true # this is a boolean variable
13 changes: 13 additions & 0 deletions services/react-native-web-browser/.github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Summary:

## Steps to reproduce:

## Expected behavior:

## Additional notes:

#### Tasks

- [ ] Task 1
- [ ] Task 2
- [ ] Task 3
23 changes: 23 additions & 0 deletions services/react-native-web-browser/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## What does this do?

<!---
_Describe what your changes **do**; did you add a $COOL_FEATURE? Write about it here._
-->

## Why did you do this?

<!---
_**Why** did you make these changes? This is your opportunity to provide the rationale that drove the design of your solution._
-->

## Who/what does this impact?

<!---
_Does your code affect something downstream? Are there side effects people should know about? Tag any developers that should be kept abreast of this change._
-->

## How did you test this?

<!---
_How did you test your change? Document it here._
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# πŸ”— Links:
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/actions/eas-build/action.yml
# EAS Build docs: https://docs.expo.dev/eas-update/github-actions/

# ✍️ Description:
# This is a composite action, which means it can be used in other actions.
# This action is used to trigger an EAS Build for a specific environment (development, staging, production).
# This action accepts those inputs:
# `APP_ENV`, which is used to generate an APK for a specific environment (development, staging, production). We use staging by default.
# `AUTO_SUBMIT`, false by default, set to true if you want to automatically submit your build to stores.
# `EXPO_TOKEN`, required, access token for your Expo account. https://expo.dev/settings/access-tokens
# `VERSION`, required, version of the app to build. used as the build message.
# `ANDROID`, true by default, set to true if you don't want to trigger build for Android.
# `IOS`, false by default, set to true if you want to trigger build for IOS.

# Before triggering the build, we run a pre-build script to generate the necessary native folders based on the APP_ENV.
# Based on the ANDROID and IOS inputs, we trigger the build for the corresponding platform with the corresponding flags.

# πŸ‘€ Example usage:
# - name: ⏱️ EAS Build
# uses: ./.github/actions/eas-build
# with:
# APP_ENV: staging
# EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}
# VERSION: ${{ github.event.release.tag_name }}
# IOS: false

name: 'Setup EAS Build + Trigger Build'
description: 'Setup EAS Build + Trigger Build'
inputs:
APP_ENV:
description: 'APP_ENV (one of): development, staging, production'
required: true
default: 'staging'
AUTO_SUBMIT: ## TODO: we need to handle this too
description: 'AUTO_SUBMIT (one of): true, false'
required: true
default: 'false'
ANDROID:
description: 'run for ANDROID (one of): true, false'
required: true
default: 'true'
VERSION:
description: 'VERSION'
required: true
default: '0.0.0'
IOS:
description: 'run for IOS (one of): true, false'
required: true
default: 'false'
EXPO_TOKEN:
description: 'EXPO_TOKEN'
required: true
default: 'false'

runs:
using: 'composite'
steps:
- name: πŸ’― Check for EXPO_TOKEN
run: |
if [ -z "${{ inputs.EXPO_TOKEN }}" ]; then
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
exit 1
fi
shell: bash

- name: πŸ“¦ Setup Expo and EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ inputs.EXPO_TOKEN }}

- name: βš™οΈ Run Prebuild
run: pnpm prebuild:${{ inputs.APP_ENV }}
shell: bash

- name: πŸ“± Run Android Build
if: ${{ inputs.ANDROID == 'true' }}
run: pnpm build:${{ inputs.APP_ENV }}:android --non-interactive --no-wait --message "Build ${{ inputs.APP_ENV }} ${{ inputs.VERSION }}"
shell: bash

- name: πŸ“± Run IOS Build
if: ${{ inputs.IOS == 'true' }}
run: pnpm build:${{ inputs.APP_ENV }}:ios --non-interactive --no-wait --message "Build ${{ inputs.APP_ENV }} ${{ inputs.VERSION }}"
shell: bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# πŸ”— Links:
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/actions/setup-jdk-generate-apk/action.yml
# Composite actions docs: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action

# ✍️ Description:
# This is a composite action, which means it can be used in other actions.
# This action is used to set up the JDK environment and generate an Android APK for testing.
# This action accepts one input: `APP_ENV`, which is used to generate an APK for a specific environment (development, staging, production). We use staging by default.
# Before generating the APK, we run a pre-build script to generate the necessary native folders based on the APP_ENV.
# On success, the APK is generated at `./android/app/build/outputs/apk/release/app-release.apk`.

# πŸ‘€ Example usage:
# - name : πŸ“¦ Set Up JDK + Generate Test APK
# uses: ./.github/actions/setup-jdk-generate-apk
# with:
# APP_ENV: 'staging'

name: 'Setup JDK + GRADLE + Generate APK'
description: 'Setup JDK + GRADLE + Generate APK'
inputs:
APP_ENV:
description: 'APP_ENV (one of): development, staging, production'
required: true
default: 'staging'

runs:
using: 'composite'
steps:
- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Generate Test APK
run: |
pnpm prebuild:${{ inputs.APP_ENV }}
cd android
chmod +x ./gradlew
./gradlew assembleRelease --no-daemon
cd ..
shell: bash
env:
EXPO_NO_DOTENV: '1'
APP_ENV: ${{ inputs.APP_ENV }}
CI: 'true'
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# πŸ”— Links:
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/actions/setup-node-pnpm-install/action.yml
# Composite actions docs: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action

# ✍️ Description:
# This is a composite action, which means it can be used in other actions.
# It is used in almost all workflows to set up the environment and install dependencies.
# Updating the package manager or Node version here will be reflected in all workflows.

# πŸ‘€ Example usage:
# - name : πŸ“¦ Setup Node + PNPM + install deps
# uses: ./.github/actions/setup-node-pnpm-install

name: 'Setup Node + PNPM + Install Dependencies'
description: 'Setup Node + PNPM + Install Dependencies'
runs:
using: 'composite'
steps:
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: πŸ“¦ Install Project Dependencies
run: pnpm install --frozen-lockfile
shell: bash
26 changes: 26 additions & 0 deletions services/react-native-web-browser/.github/scripts/expo-doctor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Run expo-doctor and capture output and exit code
output=$(npx expo-doctor@latest 2>&1)
exit_code=$?

# Output file location
output_file=".expo/expo-doctor.md"
{
# Add summary based on exit code
if [ $exit_code -eq 0 ]; then
echo "βœ… **Good news!** We ran Expo Doctor for this PR and everything looks good, Great job!" > "$output_file"
else
echo "❌ **Action Required:** We ran Expo Doctor for this PR and found some issues that need to be addressed. Please review the complete report below πŸ‘‡" > "$output_file"
echo >> "$output_file" # Add blank line
echo "\`\`\`shell" >> "$output_file"
echo "$output" >> "$output_file"
echo "\`\`\`" >> "$output_file"
fi
}

# Show original output in terminal
echo "$output"

# Return the original exit code
exit $exit_code
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# πŸ”— Links:
# Source file: https://github.com/obytes/react-native-template-obytes/blob/master/.github/workflows/compress-images.yml

# ✍️ Description:
# This workflow is used to compress images in the repo.
# This workflow will trigger on a push to the "master" or "main" branch and only run when a new image is added or updated.
# If it's the case, it will compress those images and create a pull request with the compressed images.

# 🚨 GITHUB SECRETS REQUIRED: None

name: Compress images
on:
push:
branches:
- master
- main
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'
workflow_dispatch:

jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
ignorePaths: 'node_modules/**,ios/**,android/**'

- name: Create Pull Request
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v3
with:
title: Auto Compress Images
branch-suffix: timestamp
commit-message: Compress Images
body: ${{ steps.calibre.outputs.markdown }}
Loading