Skip to content

Commit

Permalink
Create manual build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Diwakar-Gupta committed Dec 15, 2023
1 parent 5d61ab5 commit 7d8310b
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Manual workflow

on:
workflow_dispatch:
inputs:
APP_VERSION:
description: 'Version Number'
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Install Java 17
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'

- name: Install dependencies
run: |
yarn install
- name: Build Android release
run: |
echo "" >> .env
echo "APP_VERSION=${{ github.event.inputs.APP_VERSION }}" >> .env
cd android
./gradlew assembleRelease
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.APP_VERSION }}
release_name: ${{ github.event.inputs.APP_VERSION }}
draft: false
prerelease: false

- name: Upload Release to GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: android/app/build/outputs/apk/release/app-release.apk
asset_name: app-release.apk
asset_content_type: application/apk


0 comments on commit 7d8310b

Please sign in to comment.