2025.03.01 - [Unity] - Unity Git hub Acitons - 3 (Unity 연동)
Unity Git hub Acitons - 3 (Unity 연동)
[Git hub Action Workflow 작성] 이전 글들에서 Git hub Actions의 구성요소 및 키워드들에 대해서 알아보았고, 간단한 예제의 Workflow를 작성해 보았습니다. 이번 글에서는 Workflow를 통해 Unity 빌드를 자동화
develophyun.tistory.com
이전 게시글에서 Unity를 빌드하고 이를 artifact에 업로드하는 것까지 알아보았는데요. 작업을 하면서 Game-ci/unity-builder를 잘 모르고 사용하는 것 같아 이를 정리하고 넘어가려고 합니다.
Game-ci/unity-builder@v4
# Build
- name: Build project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE}}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: Android
Game-ci의 env 속성은 이전 글에서 다루었으니, 해당 페이지에서는 with에 적용되는 주로 속성을 정리하려고합니다.
각 with 속성은 required의 false, true 및 default 속성으로 기본 세팅이 됩니다. 각 문서에
- targetPlatform : build를 진행할 Platform을 설정 ex) Android, Window, iOS 등등
- required : true
- unityVersion : specific Unity version > Build Unity Editor Version 지정
- required : false, default : auto
- projectPath : 구체적인 유니티 프로젝트의 Path
- required: false default: <your project root>
- buildName : build 진행 시 output 되는 buildfile 이름 > 별도로 지정하지 않으면 targetPlatform의 이름을 따라갑니다.
- required : false , default : <build_target>
- buildsPath : build 진행 시 output 되는 build의 폴더 Path 지정
- required: false, default : build
위 yml 파일 스크립트를 보았을 때 설정을 확인해 보면, 아래와 같은 결과물로 빌드가 됩니다.
targetPlatform : android
unityVersion : auto > github repository의 unity version
projectPath : 별도 지정하지 않았으니, unity 프로젝트의 root Path
buildName : android
buildsPath : build
결과물 : build/build/android.apk
해당 build 경로가 중요한 이유는 Game-ci/unity-builder를 활용하여 나온 결과물을 artifact or discord, slack 등 다양한 외부 툴에 업로드하여 다른 사용자에게 접근가능하게 전달할 수 있습니다.
actions/upload-artifact
- name : artifact에 올라갈 파일 이름
- required : false, default : artifact
- path : artifact에 올릴 file or directory
- required : true
- if-no-files-found : file을 찾지 못했을 때 어떻게 처리할 것인가?
- required : false, default : warn
- values : error, ignore > error case githubAction Fail
여기서 artifact에 올릴 Path를 지정하기 위해서 위 Game-ci의 BuildPath가 어떻게 구성되는지를 알아야 하여 이 문서를 정리하게 되었습니다. 추가적인 Document의 정보를 확인하기 위해서는 아래 링크를 참조하는 것이 좋습니다.
위 Document를 다 이해하고 build하여 artifact 및 discord에 업로드를 진행하였는데 아래와같은 에러가 발생하여 추 후 수정 예정입니다.
{"message": "Request entity too large", "code": 40005}
'Unity' 카테고리의 다른 글
Unity Git hub Acitons - 3 (Unity 연동) (0) | 2025.03.01 |
---|---|
Unity Git hub Acitons - 2 (Workflow 작성) (0) | 2025.02.25 |
Unity Git hub Actions - 1 (개념 정리) (0) | 2025.02.25 |
Addressable Asset (6) - Download Progress 처리 (0) | 2025.02.16 |
Unity Addressable Asset (5) (0) | 2025.02.13 |