Skip to content

Commit

Permalink
Feat/better gihub actions (#9)
Browse files Browse the repository at this point in the history
feat(): add ci actions for tsc, lint for pull request to master | add build & deploy ci action for closed pr's
  • Loading branch information
Dawqss authored Oct 22, 2024
1 parent 0e345a2 commit ce369e0
Show file tree
Hide file tree
Showing 16 changed files with 479 additions and 110 deletions.
23 changes: 23 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Setup Node and Install Dependencies'
description: 'Setup Node.js and install dependencies'
runs:
using: 'composite'
steps:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: |
~/.yarn
~/.cache
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
56 changes: 0 additions & 56 deletions .github/workflows/build.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/check-build-deploy-to-test-users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI Pipeline

on:
pull_request:
branches:
- master
types:
- closed

jobs:
tsc:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-node
- name: Run TypeScript compiler
run: yarn run tsc
lint:
runs-on: ubuntu-latest
needs: tsc
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-node
- name: Run Linting
run: yarn run lint
build-ios:
runs-on: macos-latest
needs: [tsc, lint]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.0'
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-node
- name: Install Fastlane
run: |
cd ios
rm -rf Gemfile.lock
gem install bundler -v 2.4.22
bundle install
- name: Install Pods
run: |
cd ios
pod install
- name: Run Fastlane Lane
run: |
cd ios
bundle exec fastlane certificates && bundle exec fastlane deploy
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
GIT_AUTHORIZATION: ${{ secrets.GIT_AUTHORIZATION }}
33 changes: 33 additions & 0 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI Pipeline

on:
pull_request:
branches:
- master

jobs:
tsc:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-node
- name: Run TypeScript compiler
run: yarn run tsc
lint:
runs-on: ubuntu-latest
needs: tsc
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node and Install Dependencies
uses: ./.github/actions/setup-node
- name: Run Linting
run: yarn run lint
build:
runs-on: ubuntu-latest
needs: [tsc, lint]
steps:
- name: Build app with fastlane
run: echo Add fastlane lane for build only without deploy step
18 changes: 0 additions & 18 deletions .github/workflows/lint-check.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/tsc-check.yml

This file was deleted.

10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ yarn-error.log
# 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
ios/oldFastlane/report.xml
ios/oldFastlane/Preview.html
ios/oldFastlane/screenshots
ios/oldFastlane/test_output

ios/fastlane/.env.default

# Bundle artifact
*.jsbundle
Expand Down
34 changes: 22 additions & 12 deletions ios/CkOnboardinApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,16 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 5G4M55X26F;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 5G4M55X26F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = CkOnboardinApp/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Simple Weather App";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.weather";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -485,8 +491,10 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_BUNDLE_IDENTIFIER = com.dawidcompany.simpleweatherapp;
PRODUCT_NAME = CkOnboardinApp;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.dawidcompany.simpleweatherapp";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -499,9 +507,15 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 5G4M55X26F;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 5G4M55X26F;
INFOPLIST_FILE = CkOnboardinApp/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Simple Weather App";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.weather";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -512,8 +526,10 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_BUNDLE_IDENTIFIER = com.dawidcompany.simpleweatherapp;
PRODUCT_NAME = CkOnboardinApp;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore com.dawidcompany.simpleweatherapp";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down Expand Up @@ -592,10 +608,7 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
Expand Down Expand Up @@ -668,10 +681,7 @@
"-DFOLLY_CFG_NO_COROUTINES=1",
"-DFOLLY_HAVE_CLOCK_GETTIME=1",
);
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
1 change: 0 additions & 1 deletion ios/CkOnboardinApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSAllowsLocalNetworking</key>
Expand Down
4 changes: 4 additions & 0 deletions ios/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "fastlane", '~> 2.224.0'
gem "dotenv"
Loading

0 comments on commit ce369e0

Please sign in to comment.