diff --git a/.github/workflows/smeemDev.yml b/.github/workflows/smeemDev.yml index 395dbaf9..e1d4a674 100644 --- a/.github/workflows/smeemDev.yml +++ b/.github/workflows/smeemDev.yml @@ -6,8 +6,6 @@ name: Swift on: push: branches: [ "develop" ] - pull_request: - branches: [ "develop" ] jobs: build: @@ -25,3 +23,19 @@ jobs: run: echo "${{ secrets.DEBUG_CONFIG }}" > ./Smeem-iOS/Debug.xcconfig - name: Build run: xcodebuild clean test -project Smeem-iOS/Smeem-iOS.xcodeproj -scheme Smeem-Dev -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.2' -quiet + + # 성공 시 Discord 알림 + - name: Notify Discord on success + if: success() + run: | + curl -H "Content-Type: application/json" \ + -d '{"username": "GitHub Actions", "content": "✅ Build succeeded for branch `${{ github.ref_name }}`."}' \ + ${{ secrets.DISCORD_WEBHOOK_URL_DEV }} + + # # 실패 시 Discord 알림 + - name: Notify Discord on failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -d '{"username": "GitHub Actions", "content": "❌ Build failed for branch `${{ github.ref_name }}`. Check logs for details."}' \ + ${{ secrets.DISCORD_WEBHOOK_URL_DEV }}