-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (65 loc) · 2.5 KB
/
BUILD_PACKAGE.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: 쿠링 스위프트 패키지 빌드하기
on:
issue_comment:
types: [created, edited]
jobs:
build:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/쿠링') && contains(github.event.comment.body, '패키지 빌드')
runs-on: macos-13 #최신버전
steps:
# 빌드 요청 시작
- name: Build iOS17
run: |
echo "start build"
# build package 빌드 응답 커멘트
- name: Add Build comment
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🔨 iOS 17.0.1 iPhone 15 Pro 에서 스위프트 패키지를 빌드합니다.'
})
# 코드를 체크아웃 합니다.
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
# Xcode 버전을 설정합니다.
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
# package-kuring 패키지를 빌드합니다. (최소 버전)
- name: package-kuring 의 App 스킴 빌드
run: |
cd package-kuring
xcodebuild build -scheme App -destination 'platform=iOS Simulator,OS=latest,name=iPhone 14 Pro' -skipMacroValidation
# 빌드 성공시 커멘트
- name: Add Build comment
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '✅ 패키지를 성공적으로 빌드했습니다.'
})
# 빌드 실패시 커멘트
- name: Notify failure
uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '📬 패키지 빌드에 실패했습니다. Actions에서 실패 결과를 확인해주세요.'
})
if: failure()