Skip to content

Commit

Permalink
Merge pull request #287 from team-peekabook/feature/#286-cd
Browse files Browse the repository at this point in the history
#286 [chore] apk 업로드 CD 구현
  • Loading branch information
2zerozu authored Dec 23, 2023
2 parents 7d9d1f2 + d6d9451 commit 080e1e1
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/pr_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,58 @@ jobs:
SLACK_TITLE: 'Peekabook/Android Debug build Fail❌'
MSG_MINIMAL: true
SLACK_USERNAME: Peekabook-AOS
SLACK_MESSAGE: '에러를 확인해주세요'
SLACK_MESSAGE: '에러를 확인해주세요'

- name: Upload APK
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: apk
path: app/build/outputs/apk/release/app-release.apk/

upload:
needs: [ build ]
name: upload to Slack
runs-on: ubuntu-latest
steps:
- name: download Article
uses: actions/download-artifact@v2
with:
name: apk

- name: Update Release apk name
if: ${{ success() }}
run: |
mv app-release.apk 피카북-Release.apk
echo 'apk=피카북-Release.apk' >> $GITHUB_ENV
- name: Upload APK at Slack
if: ${{ success() }}
run: |
curl -X POST \
-F file=@$apk \
-F channels=${{secrets.SLACK_CHANNEL_ID}} \
-H "Authorization: Bearer ${{secrets.SLACK_BOT_TOKEN}}" \
https://slack.com/api/files.upload
- name: On Success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'peekabook/Anroid apk upload S.U.C.C.E.S.S 🎉🎉🎉'
SLACK_COLOR: '#5BFF33'
MSG_MINIMAL: true
SLACK_USERNAME: Peekabook-AOS
SLACK_MESSAGE: 'apk 생성 완료! '

- name: On Success but Fail
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_TITLE: 'peekabook/Anroid apk upload Fail❌'
SLACK_COLOR: '#FFF233'
MSG_MINIMAL: true
SLACK_USERNAME: Peekabook-AOS
SLACK_MESSAGE: '빌드는 완료 되었으나 apk업로드 에러'

0 comments on commit 080e1e1

Please sign in to comment.