From 5c7b64e641131c88dce5cffbaf5d8d0045a2f15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=ED=95=98=EC=A4=80?= Date: Tue, 2 Jun 2026 09:50:23 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=9E=90=EB=8F=99?= =?UTF-8?q?=ED=99=94!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/depoly.yml | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/depoly.yml diff --git a/.github/workflows/depoly.yml b/.github/workflows/depoly.yml new file mode 100644 index 0000000..d53fa65 --- /dev/null +++ b/.github/workflows/depoly.yml @@ -0,0 +1,86 @@ +name: Unity Build and Release ๐Ÿš€ + +on: + push: + tags: + - 'v*' # v1.0.0 ๊ฐ™์€ ํƒœ๊ทธ๊ฐ€ ํ‘ธ์‹œ๋  ๋•Œ๋งŒ ์‹คํ–‰ + +jobs: + build: + name: Build for Windows & Android ๐ŸŽฎ + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneWindows64 # Windows 64๋น„ํŠธ + - Android # ์•ˆ๋“œ๋กœ์ด๋“œ + + steps: + # 1. ์†Œ์Šค ์ฝ”๋“œ ์ฒดํฌ์•„์›ƒ + - name: Checkout repository + uses: actions/checkout@v4 + with: + lfs: true # ๋Œ€์šฉ๋Ÿ‰ ์—์…‹(LFS) ์‚ฌ์šฉ ์‹œ ํ•„์ˆ˜ + + # 2. ๋นŒ๋“œ ์†๋„ ํ–ฅ์ƒ์„ ์œ„ํ•œ Library ํด๋” ์บ์‹ฑ + - name: Cache Library + uses: actions/cache@v3 + with: + path: Library + key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/**', 'Packages/**') }} + restore-keys: | + Library-${{ matrix.targetPlatform }}- + + # 3. ์œ ๋‹ˆํ‹ฐ ๊ณ„์ • ์ •๋ณด๋ฅผ ์ด์šฉํ•œ ์ž๋™ ๋นŒ๋“œ (GameCI) + - name: Run Unity Build + uses: game-ci/unity-builder@v4 + env: + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} # ๊นƒํ—ˆ๋ธŒ ์•”ํ˜ธํ™” ๋ณ€์ˆ˜์—์„œ ๊ฐ€์ ธ์˜ด + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} # ๊นƒํ—ˆ๋ธŒ ์•”ํ˜ธํ™” ๋ณ€์ˆ˜์—์„œ ๊ฐ€์ ธ์˜ด + with: + targetPlatform: ${{ matrix.targetPlatform }} + + # 4. ๋นŒ๋“œ ๊ฒฐ๊ณผ๋ฌผ ์••์ถ• + - name: Zip Build Output + run: | + cd build/${{ matrix.targetPlatform }} + zip -r ../../${{ matrix.targetPlatform }}.zip . + + # 5. ๋นŒ๋“œ ์•„ํ‹ฐํŒฉํŠธ ์ž„์‹œ ์ €์žฅ + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: Build-${{ matrix.targetPlatform }} + path: ${{ matrix.targetPlatform }}.zip + + release: + name: Create GitHub Release ๐Ÿ“ฆ + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # ๋นŒ๋“œ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + # ๊นƒํ—ˆ๋ธŒ ๋ฆด๋ฆฌ์ฆˆ ์ƒ์„ฑ ๋ฐ ํŒŒ์ผ ์—…๋กœ๋“œ + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/Build-StandaloneWindows64/StandaloneWindows64.zip + artifacts/Build-Android/Android.zip + tag_name: ${{ github.ref_name }} + name: Release ${{ github.ref_name }} + body: | + ## ๐ŸŽฎ ๋ฐฐํฌ ์•ˆ๋‚ด + - GitHub Actions๋ฅผ ํ†ตํ•ด ๊ณ„์ • ์ธ์ฆ ํ›„ ์ž๋™ ๋นŒ๋“œ๋œ ๋ฒ„์ „์ž…๋‹ˆ๋‹ค. + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}