Skip to content

Commit 7edf6ef

Browse files
Merge branch 'master' into chore/readme
2 parents 6458beb + d5b9322 commit 7edf6ef

34 files changed

+728
-348
lines changed

.easignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
node_modules/
2+
.expo/
3+
dist/
4+
npm-debug.*
5+
*.jks
6+
*.p8
7+
*.p12
8+
*.key
9+
*.mobileprovision
10+
*.orig.*
11+
web-build/
12+
yarn-error.log
13+
/coverage
14+
15+
# Allow local environment files to be copied to the build directory
16+
!.env.*
17+
18+
/ios
19+
/android
20+
21+
# macOS
22+
.DS_Store
23+
*.apk
24+
*.ipa
25+
26+
expo-env.d.ts
27+
28+
# cli
29+
cli/README.md

.env.sample

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
API_URL=https://dummyjson.com/
2-
3-
## TODO: add the variable to your CI and remove it from here, not recommended setting sensitive values on your git repo
4-
SECRET_KEY=my-secret-key
5-
VAR_NUMBER=10 # this is a number variable
6-
VAR_BOOL=true # this is a boolean variable
1+
API_URL=
2+
VAR_NUMBER=
3+
VAR_BOOL=
4+
SECRET_KEY=
Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
#
1313

1414
# 🚨 GITHUB SECRETS REQUIRED:
15+
# - NPM_TOKEN: A NPM Access Token with Publish access.
1516
# - GH_TOKEN: A GitHub token with write repo access.
16-
# You can generate one from here: https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
17+
# You can generate one from here: https://github.com/settings/tokens
1718
# make sure to add it to the repo secrets with the name GH_TOKEN
19+
# Attention: Not to be confused with the GITHUB_TOKEN, this is a different token with different permissions.
1820

19-
name: New CLI Version
21+
name: Deploy CLI to NPM Registry
2022

2123
on:
2224
workflow_dispatch:
@@ -32,62 +34,52 @@ on:
3234
- major
3335

3436
jobs:
35-
release:
36-
name: Create New Version and push new tag
37+
deploy:
3738
runs-on: ubuntu-latest
39+
environment:
40+
name: CLI
3841
permissions:
3942
contents: write
4043
steps:
4144
- name: 🔍 GH_TOKEN
4245
if: env.GH_TOKEN == ''
4346
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45-
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
46-
47+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
48+
run: echo "GH_TOKEN=${GH_TOKEN}" >> $GITHUB_ENV
4749
- name: 📦 Checkout project repo
4850
uses: actions/checkout@v3
4951
with:
5052
fetch-depth: 0
5153
token: ${{ secrets.GH_TOKEN }}
52-
5354
- name: 📝 Git User Setup
5455
run: |
5556
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
5657
git config --global user.name "github-actions[bot]"
57-
5858
- name: 📦 Setup Node + PNPM
5959
uses: ./.github/actions/setup-node-pnpm-install
60-
61-
- name: Install CLI dependencies
60+
- name: 📦 Install CLI Dependencies
6261
run: |
6362
cd cli
6463
pnpm install --frozen-lockfile
65-
66-
- name: Bump release version
64+
- name: 📦 Bump release version
6765
run: |
6866
cd cli
6967
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
7068
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
7169
env:
7270
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
73-
7471
- name: Commit package.json changes
7572
run: |
7673
git add "cli/package.json"
77-
git commit -m "build(cli): release ${{ env.NEW_VERSION }}"
78-
79-
- name: Set publishing config
80-
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
74+
git commit -m "build(cli): release CLI ${{ env.NEW_VERSION }}"
75+
- name: 🔑 Set publishing config
76+
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
8177
env:
82-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
83-
84-
- name: Publish
78+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
79+
- name: 📦 Publish to NPM registry
8580
run: |
8681
cd cli
8782
pnpm publish --verbose --tag ${{ env.RELEASE_TAG }}
88-
89-
- name: Push changes to repository
90-
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
- name: 🔗 Push changes to repository
9284
run: |
9385
git push origin && git push --tags

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
needs: build
3030
runs-on: ubuntu-latest
3131
environment:
32-
name: github-pages
32+
name: docs
3333
url: ${{ steps.deployment.outputs.page_url }}
3434
steps:
3535
- name: Deploy to GitHub Pages

.github/workflows/expo-doctor.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ jobs:
2828
name: Expo Doctor (expo)
2929
runs-on: ubuntu-latest
3030

31-
env:
32-
# Add your other environment variables here, e.g.:
33-
API_URL: https://dummyjson.com/
34-
SECRET_KEY: my-secret-key
35-
VAR_NUMBER: 10
36-
VAR_BOOL: true
37-
3831
steps:
3932
- name: 📦 Checkout project repo
4033
uses: actions/checkout@v3
@@ -44,8 +37,5 @@ jobs:
4437
- name: 📦 Setup Node + PNPM + install deps
4538
uses: ./.github/actions/setup-node-pnpm-install
4639

47-
- name: Run prebuild
48-
run: pnpm run prebuild ## we only need to run this to generate the badged icon in `.expo` folder
49-
5040
- name: 🚑 Run Doctor Checks
5141
run: rm -rf ios android && pnpm run doctor ## apprently the new update of expo will break if you already have ios and android folders in your project as they will show up a eas warning

.github/workflows/new-app-version.yml renamed to .github/workflows/new-template-version.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Starter releasing process: https://starter.obytes.com/ci-cd/app-releasing-process/
44

55
# ✍️ Description:
6-
# This workflow is used to create a new version of the app and push a new tag to the repo.
6+
# This workflow is used to create a new version of the template and push a new tag to the repo.
77
# As this workflow will push code to the repo, we set up GitHub Bot as a Git user.
88
# This Workflow need to be triggered manually from the Actions tab in the repo.
99
# 1. Choose your release type (patch, minor, major)
@@ -16,10 +16,11 @@
1616

1717
# 🚨 GITHUB SECRETS REQUIRED:
1818
# - GH_TOKEN: A GitHub token with write repo access.
19-
# You can generate one from here: https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
19+
# You can generate one from here: https://github.com/settings/tokens
2020
# make sure to add it to the repo secrets with the name GH_TOKEN
21+
# Attention: Not to be confused with the GITHUB_TOKEN, this is a different token with different permissions.
2122

22-
name: New App Version
23+
name: New Template Version
2324

2425
on:
2526
workflow_dispatch:
@@ -38,6 +39,8 @@ jobs:
3839
release:
3940
name: Create New Version and push new tag
4041
runs-on: ubuntu-latest
42+
environment:
43+
name: template
4144
permissions:
4245
contents: write
4346
steps:
@@ -60,6 +63,6 @@ jobs:
6063
- name: 📦 Setup Node + PNPM + install deps
6164
uses: ./.github/actions/setup-node-pnpm-install
6265

63-
- name: 🏃‍♂️ Run App release
66+
- name: 🏃‍♂️ Run Template release
6467
run: |
6568
pnpm app-release ${{ github.event.inputs.release-type }}

.github/workflows/sonar.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ jobs:
4040
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT }}
4141
-Dsonar.sonar.sourceEncoding=UTF-8
4242
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info
43-
-Dsonar.coverage.exclusions=**/storage/**,**/**.config.js,**/*.test.tsx,**/icons/**,**/docs/**,**/cli/**,**/__mocks__/**,**/android/**,**/ios/**,env.js
43+
-Dsonar.coverage.exclusions=**/node_modules/**,**/storage/**,**/**.config.js,**/*.test.ts,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx,**/icons/**,**/docs/**,**/cli/**,**/android/**,**/ios/**,env.js
44+
-Dsonar.exclusions=,**/__mocks__/**
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: ⤵️ Check upstream for changes
2+
3+
on:
4+
schedule:
5+
- cron: '0 12 * * *'
6+
workflow_dispatch:
7+
inputs: {}
8+
9+
jobs:
10+
autoupdate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
token: ${{ secrets.GH_TOKEN }}
17+
18+
- uses: fopina/upstream-to-pr@v1
19+
with:
20+
token: ${{ secrets.GH_TOKEN }}
21+
upstream-repository: https://github.com/obytes/react-native-template-obytes
22+
upstream-branch: master

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@ web-build/
1212
yarn-error.log
1313
/coverage
1414

15-
.env.development
16-
.env.production
17-
.env.staging
18-
.env.qa
15+
.env.*
16+
!.env.sample
1917

2018
/ios
2119
/android

.vscode/settings.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,11 @@
2424
"editor.formatOnSave": true,
2525
"editor.defaultFormatter": "astro-build.astro-vscode"
2626
},
27-
"cSpell.words": [
28-
"Flashlist",
29-
"Lato",
30-
"rootstrap"
31-
],
32-
"i18n-ally.localesPaths": [
33-
"src/translations/"
34-
],
27+
"cSpell.words": ["Flashlist", "Lato", "rootstrap"],
28+
"i18n-ally.localesPaths": ["src/translations/"],
3529
"i18n-ally.keystyle": "nested",
3630
"i18n-ally.disabled": false, // make sure to disable i18n-ally in your global setting and only enable it for such projects
3731
"tailwindCSS.experimental.classRegex": [
38-
[
39-
"tv\\(([^)]*)\\)",
40-
"[\"'`]([^\"'`]*).*?[\"'`]"
41-
]
42-
],
43-
}
32+
["tv\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
33+
]
34+
}

0 commit comments

Comments
 (0)