Skip to content

Commit

Permalink
chore - Added Remaining Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
niyajali committed Dec 7, 2024
1 parent e13ec10 commit eda5c1b
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-and-deploy-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build And Deploy Web App

# Trigger conditions for the workflow
on:
pull_request:
branches: [ "dev" ]
types: [ closed ]
workflow_dispatch:

# Concurrency settings to manage multiple workflow runs
# This ensures orderly deployment to production environment
concurrency:
group: "web-pages"
cancel-in-progress: false

permissions:
contents: read # Read repository contents
pages: write # Write to GitHub Pages
id-token: write # Write authentication tokens
pull-requests: write # Write to pull requests

jobs:
build_and_deploy_web:
name: Build And Deploy Web App
uses: niyajali/mifos-mobile-github-actions/.github/workflows/build-and-deploy-site.yaml@main
secrets: inherit
with:
web_package_name: 'mifospay-web'
20 changes: 20 additions & 0 deletions .github/workflows/monthly-version-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Tag Monthly Release

on:
# Allow manual triggering of the workflow
workflow_dispatch:
# Schedule the workflow to run monthly
schedule:
# Runs at 03:30 UTC on the first day of every month
# Cron syntax: minute hour day-of-month month day-of-week
- cron: '30 3 1 * *'

concurrency:
group: "monthly-release"
cancel-in-progress: false

jobs:
monthly_release:
name: Tag Monthly Release
uses: niyajali/mifos-mobile-github-actions/.github/workflows/monthly-version-tag.yaml@main
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
default: internal
description: Release Type

target_branch:
type: string
default: 'dev'
description: 'Target branch for release'

publish_android:
type: boolean
default: false
Expand Down Expand Up @@ -48,14 +53,15 @@ concurrency:
jobs:
multi_platform_build_and_publish:
name: Multi-Platform Build and Publish
uses: niyajali/mifos-mobile-github-actions/.github/workflows/multi_platform_build_and_publish.yaml@main
uses: niyajali/mifos-mobile-github-actions/.github/workflows/multi-platform-build-and-publish.yaml@main
secrets: inherit
with:
release_type: ${{ inputs.release_type }}
android_package_name: 'mifospay-android'
ios_package_name: 'mifospay-ios'
desktop_package_name: 'mifospay-desktop'
web_package_name: 'mifospay-web'
release_type: ${{ inputs.release_type }}
target_branch: ${{ inputs.target_branch }}
publish_android: ${{ inputs.publish_android }}
build_ios: ${{ inputs.build_ios }}
publish_ios: ${{ inputs.publish_ios }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR Checks

# Trigger conditions for the workflow
on:
push:
branches: [ dev ] # Runs on pushes to dev branch
pull_request: # Runs on all pull requests

# Concurrency settings to prevent multiple simultaneous workflow runs
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true # Cancels previous runs if a new one is triggered

permissions:
contents: write

jobs:
pr_checks:
name: PR Checks
uses: niyajali/mifos-mobile-github-actions/.github/workflows/pr-check.yaml@main
secrets: inherit
with:
android_package_name: 'mifospay-android'
desktop_package_name: 'mifospay-desktop'
27 changes: 27 additions & 0 deletions .github/workflows/promote-to-production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Promote Release to Play Store

# Workflow triggers:
# 1. Manual trigger with option to publish to Play Store
# 2. Automatic trigger when a GitHub release is published
on:
workflow_dispatch:
inputs:
publish_to_play_store:
required: false
default: false
description: Publish to Play Store?
type: boolean
release:
types: [ released ]

concurrency:
group: "production-deploy"
cancel-in-progress: false

jobs:
# Job to promote app from beta to production in Play Store
play_promote_production:
name: Promote Beta to Production Play Store
uses: niyajali/mifos-mobile-github-actions/.github/workflows/promote-to-production.yaml@main
if: ${{ inputs.publish_to_play_store == true }}
secrets: inherit
25 changes: 25 additions & 0 deletions .github/workflows/tag-weekly-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Workflow to automatically create weekly version tags and trigger beta releases
# This workflow runs every Sunday at 4:00 AM UTC and can also be triggered manually

name: Tag Weekly Release

on:
# Allow manual triggering of the workflow
workflow_dispatch:
# Schedule the workflow to run weekly
schedule:
# Runs at 04:00 UTC every Sunday
# Cron syntax: minute hour day-of-month month day-of-week
- cron: '0 4 */2 * 0'

concurrency:
group: "weekly-release"
cancel-in-progress: false

jobs:
tag:
name: Tag Weekly Release
uses: niyajali/mifos-mobile-github-actions/.github/workflows/tag-weekly-release.yaml@main
secrets: inherit
with:
target_branch: 'dev'

0 comments on commit eda5c1b

Please sign in to comment.