50 lines
1.7 KiB
YAML
50 lines
1.7 KiB
YAML
name: code-push-cli
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
description: Choose build environment
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- QA
|
|
- Prod
|
|
target_versions:
|
|
description: please enter target versions
|
|
required: true
|
|
type: string
|
|
default: "2.3.4"
|
|
description:
|
|
description: Enter please add change log
|
|
required: true
|
|
type: string
|
|
default: "login sso"
|
|
jobs:
|
|
generate:
|
|
runs-on: [ default ]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
token: ${{ secrets.MY_REPO_PAT }}
|
|
submodules: recursive
|
|
- name: Set Node.js 16.x
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.x
|
|
- name: Install yarn
|
|
run: npm install --global yarn
|
|
- name: Install appcenter cli
|
|
run: npm install -g appcenter-cli
|
|
- name: Install dependency
|
|
run: yarn
|
|
- name: AppCenter login
|
|
run: appcenter login --token ${{ secrets.APP_CENTER_LOGIN_TOKEN }}
|
|
- name: CodePush QA
|
|
if: ((github.event.inputs.environment == 'QA' || inputs.environment == 'QA'))
|
|
run: yarn move:qa && appcenter codepush release-react -a nfa-navi.com/nfa-app -d Staging -t "${{github.event.inputs.target_versions}}" --description "${{github.event.inputs.description}}"
|
|
- name: CodePush Prod
|
|
if: ((github.event.inputs.environment == 'Prod' || inputs.environment == 'Prod'))
|
|
run: yarn move:prod && appcenter codepush release-react -a nfa-navi.com/nfa-app -d Production -t "${{github.event.inputs.target_versions}}" --description "${{github.event.inputs.description}}"
|