메뉴로 바로가기

CI UI에서 네이티브 빌드를 트리거하세요

때로는 PR를 병합하거나 릴리즈 태그를 자르기 전에 iOS 또는 Android 바이너리를 서명해야 하는 경우가 있습니다. — QA 빌드, 스토어 리서밋, 또는 일회용 테스트 플라이트. 모든 주요 code 호스트는 웹 UI에서 pipeline을 시작할 수 있습니다. 이 가이드는 UI를 Capgo 빌드와 연결하는 방법을 보여줍니다.

Git 의식이 없는

워크플로우/ pipeline을 실행하세요. Capgo 빌드는 선택한 branch에서 컴파일됩니다.

안전한 입력

플랫폼 및 빌드 모드에서 호스트가 지원하는 경우 제한된 선택을 사용합니다 (GitHub / Bitbucket / Azure). GitLab 변수는 실행 시마다 편집할 수 있습니다. 그러나 GitHub 변수를 정의하지 않으면 pipeline 입력 와 options.

CI와 동일한 비밀

CI에서 이미 있는 Capgo 빌드 인증서를 재사용하세요. 노트북에서는 새로운 정보가 없습니다.

  • Capgo 빌드가 로컬 또는 CI에서 작동하는 것을 보려면 시작하기
  • 호스트에서 이미 있는 GitHub 비밀을 서명하세요. CLI 및 gh secret set -f)
  • CAPGO_TOKEN __CAPGO_KEEP_0__의 비밀 키 / CI 변수로 저장

GitHub의 액션 작업 흐름이 선언하는 모든 워크플로우를 시작할 수 있는 탭 workflow_dispatch.

github/workflows/capgo-build-manual.yml
name: Capgo Build (Manual)
on:
workflow_dispatch:
inputs:
platform:
description: Platform to build
required: true
default: both
type: choice
options: [ios, android, both]
mode:
description: Build mode
required: true
default: debug
type: choice
options: [debug, release]
ref_note:
description: Optional note for the run summary
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ inputs.mode == 'release' && 'production' || 'build-debug' }}
strategy:
fail-fast: false
matrix:
platform: ${{ fromJSON(inputs.platform == 'both' && '["ios","android"]' || format('["{0}"]', inputs.platform)) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npx cap sync ${{ matrix.platform }}
- name: Capgo Build
env:
CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
CAPGO_IOS_PROVISIONING_MAP: ${{ secrets.CAPGO_IOS_PROVISIONING_MAP }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
APP_STORE_CONNECT_TEAM_ID: ${{ secrets.APP_STORE_CONNECT_TEAM_ID }}
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
PLAY_CONFIG_JSON: ${{ secrets.PLAY_CONFIG_JSON }}
run: |
EXTRA=""
if [ "${{ inputs.mode }}" = "debug" ] && [ "${{ matrix.platform }}" = "android" ]; then
EXTRA="--no-playstore-upload --output-upload"
fi
npx @capgo/cli@latest build request com.example.app \
--platform ${{ matrix.platform }} \
--build-mode ${{ inputs.mode }} \
$EXTRA
  1. GitHub 브라우저에서 열기
  2. 가기 액션
  3. 선택 Capgo 빌드 (수동)
  4. 클릭 워크플로우 실행
  5. branch, 플랫폼, 모드 선택
  6. 확인 워크플로우 실행

어떤 사람도 쓰기 시작할 수 있는 접근 권한이 있습니다. 샘플 맵 release GitHub 환경으로 실행됩니다. production — 해당 환경을 생성하고 필요한 리뷰어를 추가하여 빌드가 승인待ちになるように 설정하세요. 승인되지 않은 경우 environment: 작업 중인 경우 환경 보호 규칙이 적용되지 않습니다.

GitLab CI

GitLab CI

GitLab은 해당 branch에서 작업이 가능할 때 Build → Pipelines → Pipeline 실행 작업을 실행할 수 있습니다.

# Job fragment for .gitlab-ci.yml
stages:
- build
variables:
APP_ID: com.example.app
PLATFORM: android # override from Run pipeline UI
BUILD_MODE: debug
capgo_native_manual:
stage: build
when: manual
script:
- npm ci
- npm run build
- npx cap sync "$PLATFORM"
- |
npx @capgo/cli@latest build request "$APP_ID" \
--platform "$PLATFORM" \
--build-mode "$BUILD_MODE"
rules:
# Actions / Pipelines UI → manual play button
- if: '$CI_PIPELINE_SOURCE == "web"'
when: manual
# Pipeline trigger token / webhook → run automatically
- if: '$CI_PIPELINE_SOURCE == "trigger"'
when: on_success
- when: never
  1. GitLab 프로젝트 열기
  2. 바로가기 Build → Pipelines → Pipeline 실행
  3. Branch 선택
  4. 선택적으로 이 실행에 변수 설정 PLATFORM / BUILD_MODE pipeline을 시작하고
  5. __CAPGO_KEEP_0___native_manual capgo_native_manual

when: manual push를 받을 때마다 작업을 시작하지 않도록 합니다; 웹 UI(또는 pipeline trigger 토큰)를 사용하여 필요할 때 시작합니다.

Bitbucket Pipelines

Bitbucket Pipelines

Bitbucket Pipelines을 사용하여 사용자 정의 pipeline을 사용하여 Bitbucket UI가 변수를 전달할 수 있도록 하십시오:

Bitbucket Pipe
pipelines:
custom:
capgo-native-build:
- variables:
- name: PLATFORM
default: android
allowed-values:
- ios
- android
- name: BUILD_MODE
default: debug
allowed-values:
- debug
- release
- step:
name: Capgo Build
image: node:24
script:
- npm ci
- npm run build
- npx cap sync "$PLATFORM"
- npx @capgo/cli@latest build request com.example.app --platform "$PLATFORM" --build-mode "$BUILD_MODE"

수동으로 시작 Pipeline → Pipeline 실행 → 사용자 정의: capgo-native-build. 저장 CAPGO_TOKEN 및 서명 물질을 저장합니다. 저장소 설정 → Pipelines → 저장소 변수.

Azure Pipelines - capgo - 수동.yml
trigger: none # disable CI push triggers
pr: none # also disable PR triggers (GitHub/Bitbucket-backed projects)
parameters:
- name: platform
displayName: Platform
type: string
default: android
values:
- ios
- android
- name: buildMode
displayName: Build mode
type: string
default: debug
values:
- debug
- release
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '24.x'
- script: |
npm ci
npm run build
npx cap sync ${{ parameters.platform }}
npx @capgo/cli@latest build request com.example.app \
--platform ${{ parameters.platform }} \
--build-mode ${{ parameters.buildMode }}
env:
CAPGO_TOKEN: $(CAPGO_TOKEN)
# map other signing secrets from Library → Variable groups

trigger: none 그리고 pr: none 자동 CI/PR 실행을 끄고 pipeline을 시작하도록 하세요. Pipeline → Pipeline 실행 (또는 웹훅). 프로젝트가 Azure Repos branch 정책을 사용하고 이 pipeline을 대기열에 넣는 경우, 그 정책을 별도로 비활성화하세요. 추가 CAPGO_TOKEN 추가 입력

입력제안된 값주석
플랫폼ios, android, bothMatrix when both
모드debug, releaseDebug + --output-upload QA 링크를 위한
iOS 배포app_store, ad_hocApp Store에 제출하지 않는 Ad-hoc

다운로드 가능한 QA 아티팩트를 combine debug Android와 --no-playstore-upload --output-upload URL을 읽어 build last-output.

보안 참고 사항

보안 참고 사항 섹션
  • 환경 보호 규칙 (GitHub) 또는 GitLab 보호 변수를 사용하여 release 스토어에 제출하는 빌드에 대해
  • 워크플로우에 서명 비밀번호를 넣지 마십시오. inputs 만 비밀번호는 비밀/변수에만 넣으십시오.
  • 저장소 역할 및 팀 권한을 사용하여 워크플로우를 실행할 수 있는 사람의 수를 제한하십시오. (GitHub에 대한 쓰기 접근 권한이 필요합니다.) branch 보호만으로는 워크플로우를 실행하는 것을 제어할 수 없습니다. 워크플로우 실행만한 좁은 그룹만 빌드를 시작할 수 있도록 하려면 워크플로우 내에서 인증 확인을 추가하십시오.