Skip to content

Commit

Permalink
manual deploy 개선 (firebase 업로드 선택) (#246)
Browse files Browse the repository at this point in the history
Co-authored-by: 송동엽 <[email protected]>
  • Loading branch information
JuTaK97 and eastshine2741 authored Jan 28, 2024
1 parent 0e3b03d commit 1d51509
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/manual_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ on:
options:
- live
- staging
firebase:
type: boolean
description: Upload artifact to Firebase
slack:
type: boolean
description: Send message to slack
description: Send artifact to slack
slack_message:
type: string
description: Message to send with artifact

jobs:
deploy:
Expand Down Expand Up @@ -89,18 +95,18 @@ jobs:
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload artifact to Firebase App Distribution (Live)
if: startsWith(github.event.inputs.variant, 'live')
if: ${{ github.event.inputs.firebase == 'true' && startsWith(github.event.inputs.variant, 'Live') }}
run: ./gradlew appDistributionUploadLiveRelease
- name: Upload artifact to Firebase App Distribution (Staging)
if: startsWith(github.event.inputs.variant, 'staging')
if: ${{ github.event.inputs.firebase == 'true' && startsWith(github.event.inputs.variant, 'staging') }}
run: ./gradlew appDistributionUploadStagingRelease
- name: Set Message
if: ${{ github.event.inputs.slack == 'true' }}
run: |
PROPERTY=$(head -n 1 version.properties)
VERSION="${PROPERTY/snuttVersionName=}"
TITLE="SNUTT Android 빌드 알림"
MESSAGE="${VERSION} 빌드 완료"
MESSAGE=${{ github.event.inputs.slack_message }}
echo "TITLE=$TITLE" >> $GITHUB_ENV
echo "MESSAGE=$MESSAGE" >> $GITHUB_ENV
- name: Slack Notification
Expand All @@ -110,4 +116,24 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: ${{ env.TITLE }}
SLACK_MESSAGE: ${{ env.MESSAGE }}
SLACK_USERNAME: BuildNoti
SLACK_USERNAME: BuildNoti
- name: Slack Upload APK (Live)
if: ${{ github.event.inputs.slack == 'true' && startsWith(github.event.inputs.variant, 'live') }}
uses: MeilCli/slack-upload-file@v3
with:
slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }}
channel_id: ${{ secrets.SLACK_DEPLOY_CHANNEL_ID }}
file_path: './app/build/outputs/apk/live/release/app-live-release.apk'
file_name: 'app-live-release.apk'
file_type: 'apk'
initial_comment: 'live-release APK'
- name: Slack Upload APK (Staging)
if: ${{ github.event.inputs.slack == 'true' && startsWith(github.event.inputs.variant, 'staging') }}
uses: MeilCli/slack-upload-file@v3
with:
slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }}
channel_id: ${{ secrets.SLACK_DEPLOY_CHANNEL_ID }}
file_path: './app/build/outputs/apk/staging/release/app-staging-release.apk'
file_name: 'app-staging-release.apk'
file_type: 'apk'
initial_comment: 'staging-release APK'

0 comments on commit 1d51509

Please sign in to comment.