Skip to content

Commit

Permalink
[Infra] Deploy action notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jisu15-kim authored Sep 15, 2024
1 parent aaf351d commit 5ecd2be
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ jobs:
run: mise x -- tuist install
- name: Generate Xcworkspace
run: mise x -- tuist generate
- name: Change directory and set build number
- name: Get version number
id: get-version
run: |
VERSION_NUMBER=$(xcrun agvtool what-marketing-version -terse1)
echo "VERSION_NUMBER=$VERSION_NUMBER"
- name: set build number
run: |
cd Projects/App
Expand All @@ -74,6 +79,20 @@ jobs:

# 기존 디렉토리로
cd -
- name: Send start notification to Discord
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d '{
"content": null,
"embeds": [
{
"title": "iOS 배포 시작(dev)",
"description": "Actor: '${{ github.actor }}' \nVersion: '${{ env.VERSION_NUMBER }} (${ env.BUILD_NUMBER })'",
"color": 5814783
}
]
}' ${{ secrets.DISCORD_WEBHOOK_URL }}
- name: Configure Keychain
# 키체인 초기화 - 임시 키체인 생성
run: |
Expand Down Expand Up @@ -118,3 +137,33 @@ jobs:
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
- name: Success notification to Discord
if: success()
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d '{
"content": null,
"embeds": [
{
"title": "iOS 배포 성공(dev)",
"description": "Actor: '${{ github.actor }}' \nVersion: '${{ env.VERSION_NUMBER }} (${ env.BUILD_NUMBER })'",
"color": 5814783
}
]
}' ${{ secrets.DISCORD_WEBHOOK_URL }}
- name: Failure notification to Discord
if: failure()
run: |
curl -H "Content-Type: application/json" \
-X POST \
-d '{
"content": null,
"embeds": [
{
"title": "iOS 배포 실패....(dev)",
"description": "Actor: '${{ github.actor }}' \nVersion: '${{ env.VERSION_NUMBER }} (${ env.BUILD_NUMBER })'",
"color": 16711741
}
]
}' ${{ secrets.DISCORD_WEBHOOK_URL }}

0 comments on commit 5ecd2be

Please sign in to comment.