48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
# .github/workflows/ptop-build.yml
|
|
name: PTOP Build & Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
paths: ['Machines/ILSOS_PrismaticRD_PTOP/**']
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
config: [Debug, Release] # Simulation/UserDefineUnit은 sln에서 Release로 매핑되므로 중복
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup .NET Framework
|
|
uses: microsoft/setup-msbuild@v2
|
|
- name: Setup NuGet
|
|
uses: nuget/setup-nuget@v2
|
|
- name: Restore NuGet
|
|
run: nuget restore ILSOS_All.sln
|
|
- name: Build (${{ matrix.config }})
|
|
run: msbuild ILSOS_All.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ptop-${{ matrix.config }}
|
|
path: Machines/_out_prismatic_rd_ptop/x64-${{ matrix.config }}/
|
|
# 주의: Simulation/UserDefineUnit을 matrix에 넣으면 출력은 x64-Release/ 이므로 경로가 어긋난다
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: windows-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
environment: production # 수동 승인 필수
|
|
steps:
|
|
- name: Download Release Artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ptop-Release
|
|
- name: Create Release Package
|
|
run: echo 'TODO 패키징 스크립트'
|
|
- name: Deploy to Server
|
|
run: echo 'TODO 배포 스크립트'
|