Skip to content

Commit

Permalink
Merge pull request #153 from YajanaRao/develop
Browse files Browse the repository at this point in the history
Release 2024
  • Loading branch information
YajanaRao authored Aug 14, 2024
2 parents 3b92285 + 13832fd commit c6465bd
Show file tree
Hide file tree
Showing 432 changed files with 22,237 additions and 21,185 deletions.
3 changes: 2 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: yajana
# Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
open_collective: serenityapp
# Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
Expand Down
142 changes: 0 additions & 142 deletions .github/workflows/build.yml

This file was deleted.

99 changes: 99 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# This is a basic workflow to help you get started with Actions

name: Build

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [main]
paths-ignore:
- "README.md"
- "docs/**"

pull_request:
branches: [main]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:

name: Building and Distribution of Production Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.2
bundler-cache: true

- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 17

- name: Decode env file
env:
ENV_SECRET: ${{ secrets.ENV_SECRET }}
run: echo $ENV_SECRET | base64 -d > apps/mobile/.env

- name: Update permission of executables
run: chmod +x scripts/setup scripts/build

- name: Setup packages
run: npm run setup

- name: Android Build
run: npm run build

- name: Upload Artifact
uses: actions/upload-artifact@v1
if: ${{ !github.event.pull_request }}
with:
name: app-release.apk
path: apps/mobile/android/app/build/outputs/apk/release/app-release.apk

- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: app-release.apk
path: apps/mobile/android/app/build/outputs/apk/release/app-release.apk

- name: upload artifact to Beta App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1.7.0
if: ${{ !github.event.pull_request }}
with:
appId: ${{secrets.FIREBASE_APP_ID}}
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
serviceCredentialsFile: apps/mobile/android/app/google-services.json
groups: beta
file: apps/mobile/android/app/build/outputs/apk/release/app-release.apk
releaseNotes: |
Below is the apk for commit: ${{ github.event.head_commit.message }}
- name: Upload artifact to telegram channel
uses: appleboy/telegram-action@master
if: ${{ !github.event.pull_request }}
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
Below is the apk for commit: ${{ github.event.head_commit.message }}
document: ${{ github.workspace }}/apps/mobile/android/app/build/outputs/apk/release/app-release.apk

- name: Download APK from build
uses: actions/download-artifact@v1
with:
name: app-release.apk

- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.run_number }}
files: app-release.apk/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86 changes: 30 additions & 56 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: Build
name: Staging

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
Expand All @@ -12,87 +12,61 @@ on:
- "docs/**"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on

name: Building and Distribution of Dev Release
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Setup packages
run: yarn setup

# set yarn cache directory
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

# Yarn cache
- name: Cache Node Modules
id: cache-root
uses: actions/cache@v2
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Runs a single command using the runners shell
- name: Install packages
run: yarn
ruby-version: 3.1.2
bundler-cache: true

- name: Decode google-services.json
env:
FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }}
run: echo $FIREBASE_SECRET > app/mobile/android/app/google-services.json
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: 17
# - name: Decode google-services.json
# env:
# FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }}
# run: echo $FIREBASE_SECRET > apps/mobile/android/app/google-services.json

- name: Decode env file
env:
ENV_SECRET: ${{ secrets.ENV_SECRET }}
run: echo $ENV_SECRET | base64 -d > app/mobile/.env
run: echo $ENV_SECRET | base64 -d > apps/mobile/.env

- name: Add Version details
run: echo -e "\nVERSION_CODE = ${{ github.run_number }}" >> app/mobile/.env
- name: Update permission of executables
run: chmod +x scripts/setup scripts/build

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
# fixed permission issue
- name: Make gradlew executable
run: chmod +x app/mobile/android/gradlew
- name: Setup packages
run: npm run setup

# Build android app
- name: Build Android Release
run: yarn release
- name: Android Build
run: npm run build

# uploading artifact
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: app-release.apk
path: app/mobile/android/app/build/outputs/apk/release/app-release.apk
path: apps/mobile/android/app/build/outputs/apk/release/app-release.apk

- name: upload artifact to Dev App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1.3.4
uses: wzieba/Firebase-Distribution-Github-Action@v1.7.0
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
serviceCredentialsFile: app/mobile/android/app/google-services.json
serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
serviceCredentialsFile: apps/mobile/android/app/google-services.json
groups: dev
file: app/mobile/android/app/build/outputs/apk/release/app-release.apk
file: apps/mobile/android/app/build/outputs/apk/release/app-release.apk
releaseNotes: |
Below is the apk for commit: ${{ github.event.head_commit.message }}
Below is the apk for commit: ${{ github.event.head_commit.message }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ yarn-error.log*
node_modules/*

# generated files by bob
lib
lib

# turbo
.turbo
Loading

0 comments on commit c6465bd

Please sign in to comment.