Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/deploy_executables.yml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ai 폴더가 왜 생겼었던건가요 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/download-artifact 액션의 동작 방식과 mv 명령어의 사용법 때문입니다.
변경 전 명령어(mv artifacts/executable-macOS resources/mac/qgenie-ai)는
artifacts/executable-macOS라는 디렉토리를 resources/mac/ 폴더로 이동시키면서 이름을 qgenie-ai로 바꾸는 역할을 합니다. 결과적으로 resources/mac/qgenie-ai라는 디렉토리가 생기고, 그 안에 원본 파일인 qgenie-ai가 들어있게 되는 것입니다.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
# 1. 파이프라인 시작 알림
# ==================================
start:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Send Pipeline Start Notification
Expand All @@ -26,7 +27,6 @@ jobs:
${{ secrets.DISCORD_WEBHOOK_URL }}
# 1단계: 각 OS에서 실행 파일을 빌드하는 잡
build:
needs: start
strategy:
matrix:
os: [macos-latest, windows-latest]
Expand Down Expand Up @@ -78,11 +78,13 @@ jobs:
with:
name: executable-${{ runner.os }}
path: dist/${{ env.EXE_NAME }}
retention-days: 1

# 2단계: 빌드된 실행 파일들을 Front 레포지토리에 배포하는 잡
deploy:
# build 잡이 성공해야 실행됨
needs: build
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
# 1. 배포 대상인 Front 리포지토리의 코드를 가져옵니다.
Expand All @@ -104,8 +106,8 @@ jobs:
- name: Organize files
run: |
mkdir -p resources/mac resources/win
mv artifacts/executable-macOS resources/mac/qgenie-ai
mv artifacts/executable-Windows resources/win/qgenie-ai.exe
mv artifacts/executable-macOS/qgenie-ai resources/mac/
mv artifacts/executable-Windows/qgenie-ai.exe resources/win/

# 4. 변경된 파일들을 Front 리포지토리에 커밋하고 푸시합니다.
- name: Commit and push changes
Expand All @@ -117,7 +119,7 @@ jobs:
if git diff-index --quiet HEAD; then
echo "No changes to commit."
else
git commit -m "feat: AI 실행 파일 업데이트 (${{ github.ref_name }})"
git commit -m "feat: Update AI executable (${{ github.ref_name }})"
git push
fi

Expand All @@ -127,7 +129,7 @@ jobs:
finish:
needs: deploy
runs-on: ubuntu-latest
if: always()
if: always() && github.event_name == 'release'

steps:
- name: Send Success Notification
Expand Down