ci-cd-automation
24
总安装量
17
周安装量
#15578
全站排名
安装命令
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-game-developer --skill ci-cd-automation
Agent 安装分布
claude-code
15
opencode
12
gemini-cli
11
codex
11
antigravity
9
cursor
9
Skill 文档
CI/CD Automation
Pipeline Architecture
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â CI/CD PIPELINE STAGES â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â TRIGGER: [Push] [PR] [Tag] [Schedule] [Manual] â
â â â
â VALIDATE (< 5 min): â
â Lint â Compile Check â Asset Validation â
â â â
â TEST (10-30 min): â
â Unit Tests â Integration â PlayMode Tests â
â â â
â BUILD (Parallel): â
â [Windows] [Linux] [macOS] [WebGL] [Android] [iOS] â
â â â
â DEPLOY: â
â [Dev auto] â [Staging gate] â [Prod approval] â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
GitHub Actions for Unity
# â
Production-Ready: Unity CI/CD Pipeline
name: Unity Build Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
buildType:
description: 'Build type'
required: true
default: 'development'
type: choice
options:
- development
- release
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: Library-
- uses: game-ci/unity-test-runner@v4
with:
testMode: all
artifactsPath: test-results
checkName: Test Results
- uses: actions/upload-artifact@v3
if: always()
with:
name: Test Results
path: test-results
build:
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneWindows64
- StandaloneLinux64
- WebGL
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}-${{ hashFiles('Assets/**', 'Packages/**') }}
- uses: game-ci/unity-builder@v4
with:
targetPlatform: ${{ matrix.targetPlatform }}
versioning: Semantic
buildMethod: BuildScript.PerformBuild
- uses: actions/upload-artifact@v3
with:
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
retention-days: 14
deploy-staging:
needs: build
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/download-artifact@v3
with:
name: Build-WebGL
path: build/
- name: Deploy to Staging
run: |
# Deploy to staging server
aws s3 sync build/ s3://game-staging-bucket/
Unreal Engine Pipeline
# â
Production-Ready: Unreal CI/CD
name: Unreal Build Pipeline
on:
push:
branches: [main]
jobs:
build:
runs-on: [self-hosted, unreal]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Build Development
run: |
& "$env:UE_ROOT/Engine/Build/BatchFiles/RunUAT.bat" `
BuildCookRun `
-project="${{ github.workspace }}/MyGame.uproject" `
-platform=Win64 `
-clientconfig=Development `
-build -cook -stage -pak -archive `
-archivedirectory="${{ github.workspace }}/Build"
- uses: actions/upload-artifact@v3
with:
name: UnrealBuild-Win64
path: Build/
Build Optimization
BUILD TIME OPTIMIZATION:
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â STRATEGY â TIME SAVINGS â EFFORT â
ââââââââââââââââââââââââââ¼âââââââââââââââ¼ââââââââââââââââââââ¤
â Library caching â 30-50% â Low â
â Parallel builds â 40-60% â Low â
â Self-hosted runners â 20-40% â Medium â
â Incremental builds â 50-80% â Medium â
â Asset bundles split â 30-50% â High â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Automated Testing
// â
Production-Ready: PlayMode Test
[TestFixture]
public class PlayerMovementTests
{
private GameObject _player;
private PlayerController _controller;
[UnitySetUp]
public IEnumerator SetUp()
{
var prefab = Resources.Load<GameObject>("Prefabs/Player");
_player = Object.Instantiate(prefab);
_controller = _player.GetComponent<PlayerController>();
yield return null;
}
[UnityTest]
public IEnumerator Player_MovesForward_WhenInputApplied()
{
var startPos = _player.transform.position;
_controller.SetInput(Vector2.up);
yield return new WaitForSeconds(0.5f);
Assert.Greater(_player.transform.position.z, startPos.z);
}
[UnityTearDown]
public IEnumerator TearDown()
{
Object.Destroy(_player);
yield return null;
}
}
ð§ Troubleshooting
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â PROBLEM: Build times too long (>30 min) â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â SOLUTIONS: â
â â Enable Library folder caching â
â â Use self-hosted runners with SSDs â
â â Parallelize platform builds â
â â Split large asset bundles â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â PROBLEM: Flaky tests causing failures â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â SOLUTIONS: â
â â Use test timeouts â
â â Isolate tests properly â
â â Add retry logic for network tests â
â â Quarantine unstable tests â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
â PROBLEM: Cache not restoring correctly â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ¤
â SOLUTIONS: â
â â Check cache key hash inputs â
â â Verify cache path is correct â
â â Use restore-keys for partial matches â
â â Check cache size limits â
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
Deployment Strategies
| Strategy | Rollback Time | Risk | Best For |
|---|---|---|---|
| Blue-Green | Instant | Low | Web builds |
| Canary | Minutes | Low | Mobile apps |
| Rolling | Minutes | Medium | Game servers |
| Big Bang | Hours | High | Console releases |
Use this skill: When setting up build pipelines, automating testing, or improving team workflows.