Skip to content

Commit b9f064c

Browse files
committed
Merge branch 'master' into chore/eas
2 parents edc0102 + 393ddbb commit b9f064c

File tree

6 files changed

+181
-164
lines changed

6 files changed

+181
-164
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# 🔗 Links:
2+
# Source file: https://github.com/rootstrap/react-native-template/blob/master/.github/workflows/new-cli-version.yml
3+
4+
# ✍️ Description:
5+
# This workflow is used to create a new version of the CLI and publish it to the npm registry.
6+
# As this workflow will push code to the repo, we set up GitHub Bot as a Git user.
7+
# This Workflow need to be triggered manually from the Actions tab in the repo.
8+
# 1. Choose your release type (patch, minor, major)
9+
# 2. The workflow will run the np-release script which runs the following steps:
10+
# - Bump the version in package.json based on the release type using np
11+
# - Build & publish the CLI to the npm registry
12+
#
13+
14+
# 🚨 GITHUB SECRETS REQUIRED:
15+
# - 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+
# make sure to add it to the repo secrets with the name GH_TOKEN
18+
19+
name: New CLI Version
20+
21+
on:
22+
workflow_dispatch:
23+
inputs:
24+
release-type:
25+
type: choice
26+
description: 'Release type (one of): patch, minor, major'
27+
required: true
28+
default: 'patch'
29+
options:
30+
- patch
31+
- minor
32+
- major
33+
34+
jobs:
35+
release:
36+
name: Create New Version and push new tag
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: write
40+
steps:
41+
- name: 🔍 GH_TOKEN
42+
if: env.GH_TOKEN == ''
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
46+
47+
- name: 📦 Checkout project repo
48+
uses: actions/checkout@v3
49+
with:
50+
fetch-depth: 0
51+
token: ${{ secrets.GH_TOKEN }}
52+
53+
- name: 📝 Git User Setup
54+
run: |
55+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
56+
git config --global user.name "github-actions[bot]"
57+
58+
- name: 📦 Setup Node + PNPM
59+
uses: ./.github/actions/setup-node-pnpm-install
60+
61+
- name: Install CLI dependencies
62+
run: |
63+
cd cli
64+
pnpm install --frozen-lockfile
65+
66+
- name: Bump release version
67+
run: |
68+
cd cli
69+
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
70+
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
71+
env:
72+
RELEASE_TYPE: ${{ github.event.inputs.release-type }}
73+
74+
- name: Commit package.json changes
75+
run: |
76+
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}"
81+
env:
82+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
83+
84+
- name: Publish
85+
run: |
86+
cd cli
87+
pnpm publish --verbose --tag ${{ env.RELEASE_TAG }}
88+
89+
- name: Push changes to repository
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
run: |
93+
git push origin && git push --tags

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ yarn-error.log
3131

3232
expo-env.d.ts
3333
# @end expo-cli
34+
35+
# cli
36+
cli/README.md

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<p align="center">
2-
<img alt="React Native Template Obytes" src="https://github.com/obytes/react-native-template-obytes/assets/11137944/a8163d23-897a-4efe-91ce-b9bf7348c18f" width="200" />
2+
<img alt="Rootstrap's React Native Template" src="https://github.com/obytes/react-native-template-obytes/assets/11137944/a8163d23-897a-4efe-91ce-b9bf7348c18f" width="200" />
33
</p>
44

55
<h1 align="center">
6-
React Native Template Obytes
6+
Rootstrap's React Native Template
77
</h1>
88

9-
![expo](https://img.shields.io/github/package-json/dependency-version/obytes/react-native-template-obytes/expo?label=expo) ![react-native](https://img.shields.io/github/package-json/dependency-version/obytes/react-native-template-obytes/react-native?label=react-native) ![GitHub Repo stars](https://img.shields.io/github/stars/obytes/react-native-template-obytes) ![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/obytes/react-native-template-obytes) ![GitHub issues](https://img.shields.io/github/issues/obytes/react-native-template-obytes) ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/obytes/react-native-template-obytes)
9+
![expo](https://img.shields.io/github/package-json/dependency-version/rootstrap/react-native-template/expo?label=expo) ![react-native](https://img.shields.io/github/package-json/dependency-version/rootstrap/react-native-template/react-native?label=react-native) ![GitHub Repo stars](https://img.shields.io/github/stars/rootstrap/react-native-template) ![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/rootstrap/react-native-template) ![GitHub issues](https://img.shields.io/github/issues/rootstrap/react-native-template) ![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/rootstrap/react-native-template)
1010

1111
📱 A template for your next React Native project 🚀, Made with developer experience and performance first: Expo, TypeScript, TailwindCSS, Husky, Lint-Staged, expo-router, react-query, react-hook-form, I18n.
1212

13+
Based on [Obytes Starter](https://github.com/obytes/react-native-template-obytes).
14+
1315
# Overview
1416

1517
As a team of experienced developers at Obytes Mobile Tribe, we have spent years refining our approach to building high-quality React Native applications. Our starter kit is based on the best practices and tools that we have found to be most effective in our projects.
@@ -37,16 +39,16 @@ When creating this starter kit, we had several guiding principles in mind::
3739

3840
## ⭐ Key Features
3941

40-
- ✅ The latest version of Expo SDK, Along with the Custom Dev client, you can leverage the best of the Expo ecosystem and maintain full control over your app.
42+
- ✅ The latest version of Expo SDK, along with the Custom Dev client: you can leverage the best of the Expo ecosystem and maintain full control over your app.
4143
- 🎉 [TypeScript](https://www.typescriptlang.org/) for type checking, to help you catch bugs and improve code quality.
42-
- 💅 A minimal UI kit built with [TailwindCSS](https://www.nativewind.dev/), With the most common components you should have in your app.
43-
- ⚙️ Support for multiple environments builds, including Production, Staging, and Development, using Expo configuration.
44+
- 💅 A minimal UI kit built with [NativeWind](https://www.nativewind.dev/), which provides a range of pre-defined classes for styling your app.
45+
- ⚙️ Support for multiple environment builds, including Production, Staging, and Development, using Expo configuration.
4446
- 🦊 Husky for Git Hooks, to automate your git hooks and enforce code standards.
4547
- 💡 A clean project structure with Absolute Imports, to make it easier to navigate and manage your code.
46-
- 🚫 Lint-staged for running Eslint and TypeScript checks on Git staged files, to ensure that your code is always up to standards.
48+
- 🚫 Lint-staged for running ESLint and TypeScript checks on Git staged files, to ensure that your code is always up to standards.
4749
- 🗂 VSCode recommended extensions, settings, and snippets to enhance the developer experience.
4850
- ☂️ Pre-installed [Expo Router](https://docs.expo.dev/router/introduction/) with examples, to provide a comprehensive navigation solution for your app.
49-
- 💫 An auth flow with [Zustand](https://github.com/pmndrs/zustand) and [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv) as a storage solution to save sensitive data.
51+
- 💫 An auth flow with [zustand](https://github.com/pmndrs/zustand) and [react-native-mmkv](https://github.com/mrousavy/react-native-mmkv) as a storage solution to save sensitive data.
5052
- 🛠 +10 workflows for building, releasing, testing and distributing your app using [Github action](https://github.com/features/actions).
5153
- 🔥 [React Query](https://react-query.tanstack.com/) and [axios](https://github.com/axios/axios) for fetching data, to help you build efficient and performant apps.
5254
- 🧵 A good approach for handling forms with [react-hook-form](https://react-hook-form.com/) and [zod](https://github.com/colinhacks/zod) for validation + keyboard handling.
@@ -55,15 +57,15 @@ When creating this starter kit, we had several guiding principles in mind::
5557

5658
## ✍️ Documentation
5759

58-
- [Create new project ](https://starter.obytes.com/getting-started/create-new-app/)
59-
- [Rules and Conventions](https://starter.obytes.com/getting-started/rules-and-conventions/)
60-
- [Project structure](https://starter.obytes.com/getting-started/project-structure)
61-
- [Environment vars and config](https://starter.obytes.com/getting-started/environment-vars-config)
62-
- [UI and Theming](https://starter.obytes.com/ui-and-theme/ui-theming)
63-
- [Components](https://starter.obytes.com/ui-and-theme/components)
64-
- [Forms](https://starter.obytes.com/ui-and-theme/forms/)
65-
- [Data fetching](https://starter.obytes.com/guides/data-fetching/)
66-
- [Contribute to starter](https://starter.obytes.com/how-to-contribute/)
60+
- [Create new project ](https://rootstrap.github.io/react-native-template/getting-started/create-new-app/)
61+
- [Rules and Conventions](https://rootstrap.github.io/react-native-template/getting-started/rules-and-conventions/)
62+
- [Project structure](https://rootstrap.github.io/react-native-template/getting-started/project-structure/)
63+
- [Environment vars and config](https://rootstrap.github.io/react-native-template/getting-started/environment-vars-config/)
64+
- [UI and Theming](https://rootstrap.github.io/react-native-template/ui-and-theme/ui-theming/)
65+
- [Components](https://rootstrap.github.io/react-native-template/ui-and-theme/components/)
66+
- [Forms](https://rootstrap.github.io/react-native-template/ui-and-theme/forms/)
67+
- [Data fetching](https://rootstrap.github.io/react-native-template/guides/data-fetching/)
68+
- [Contribute to starter](https://rootstrap.github.io/react-native-template/how-to-contribute/)
6769

6870
## 😉 Why Expo?
6971

@@ -108,7 +110,7 @@ We value the feedback and contributions of our users, and we encourage you to le
108110
- [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/docs/)
109111
- [React Native Reanimated](https://docs.swmansion.com/react-native-reanimated/docs/)
110112
- [React Native Svg](https://github.com/software-mansion/react-native-svg)
111-
- [ React Error Boundaries](https://github.com/bvaughn/react-error-boundary)
113+
- [React Error Boundaries](https://github.com/bvaughn/react-error-boundary)
112114
- [Expo Image](https://docs.expo.dev/versions/unversioned/sdk/image/)
113115

114116
## Contributors

0 commit comments

Comments
 (0)