이 튜토리얼은 GitHub 호스팅에 초점을 맞추고 있지만, 다른 CI/CD 플랫폼에 적응하기 위해 약간의 조정을 통해 사용할 수 있습니다.
인삿말
Capacitor 앱을 Capgo에 먼저 추가하셨는지 확인하세요. 이 튜토리얼은 업로드 단계만 다룹니다. Capacitor 앱을 Capgo에 추가해야 하는 경우, 이 튜토리얼을 따라해 주세요. 튜토리얼
커밋 규칙
커밋 규칙을 따르기 시작하세요. 기본적인 커밋`이 도구가 버전 번호를 업그레이드하는 방법을 이해할 수 있도록 도와줄 것입니다. 5분 만에 배울 수 있습니다.`

GitHub 태그에 대한 액션
첫 번째 GitHub 액션을 자동으로 빌드하고 태그를 생성하기 위해 생성해야 하는 파일을 만들려면
이 경로에 파일을 만들려면: .github/workflows/bump_version.yml
이 내용과 함께:
name: Bump version
on:
push:
branches:
- main
jobs:
bump-version:
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with standard version"
steps:
- name: Check out
uses: actions/checkout@v6
with:
fetch-depth: 0
filter: blob:none
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
- name: Git config
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
- name: Create bump and changelog
run: npx capacitor-standard-version
- name: Push to origin
run: |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git pull $remote_repo $CURRENT_BRANCH
git push $remote_repo HEAD:$CURRENT_BRANCH --follow-tags --tags
이것은 메인 브랜치의 모든 커밋에 대한 태그를 릴리즈하고 메인 브랜치의 모든 커밋에 대한 변경 로그 항목을 추가합니다. CHANGELOG.md.
이 파일이 없더라도 걱정하지 마세요. 이 파일은 자동으로 생성됩니다.
이것이 작동하려면 PERSONAL ACCESS TOKEN 그리고 GitHub에 추가해야 하는 비밀키 으로 PERSONAL_ACCESS_TOKEN.
CI가 변경 로그를 제출할 수 있도록 하기 위해 필요합니다.
토큰을 생성할 때 만료 기간을 never 및 범위 repo.
마지막으로, Native 버전 번호와 일치하도록 package.json 파일에 버전을 설정하고 Native 버전 번호와 일치하도록 Sync합니다. 이로 인해 다음 단계가 facilitation됩니다.
첫 번째 경우에만 필요합니다. 그 후 도구는 최신 상태를 유지합니다.
GitHub에 태그가 나타날 수 있습니다.
native 및 web 플랫폼 모두 각 커밋마다 버전 번호가 증가합니다.
GitHub 빌드 작업
__CAPGO_KEEP_0__ 경로에 파일을 생성하세요: .github/workflows/build.yml
__CAPGO_KEEP_0__ 내용:
name: Build source code and send to Capgo
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-latest
name: "Build code and release"
steps:
- name: Check out
uses: actions/checkout@v6
- name: Install dependencies
id: install_code
run: npm i
- name: Build
id: build_code
run: npm run build
env: # Remove both lines if you don't need it
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }} # Example of env var coming from a secret
- name: Create Release
id: create_release
run: npx @capgo/cli@latest bundle upload -a ${{ secrets.CAPGO_TOKEN }} -c production
Capgo에 의존성을 설치하고 빌드한 후 Capgo으로 전송합니다.
빌드 명령이 다르다면 __CAPGO_KEEP_0__에서 변경할 수 있습니다. build_code 이 작업을 완료하려면 __CAPGO_KEEP_0__의 __CAPGO_KEEP_1__ 키를 얻어 __CAPGO_KEEP_0__의 __CAPGO_KEEP_0__ 저장소의 비밀에 추가해야 합니다.
API에 API와 Capgo를 추가한 후에 API에 커밋하면 API에 첫 번째 태그가 나타납니다. GitHub에 커밋하면 GitHub 빌드 채널에 새로운 빌드를 생성합니다. __CAPGO_KEEP_0__ 테스트를 빌드 단계에 추가하여 __CAPGO_KEEP_0__이 올바르게 작동하는지 확인해야 합니다. CAPGO_TOKEN.
GitHub에 접속하여 빌드가 생성된 것을 확인하고 CI/CD 시스템을 구축했습니다.
__CAPGO_KEEP_1__ 키를 얻으세요.
code 저장소의 비밀에 code 키를 추가하세요.
Capgo에 커밋하세요.
If you want to let all of your users get the update whenever it’s available, go to your channel and set it to public.
You can also add the native build of your Ionic Capacitor JavaScript app by following this tutorial 👇
Keep going from Github build and release app with Github actions
If you are using __CAPGO_KEEP_0__ Github build and release app with Github actions to plan __CAPGO_KEEP_0__ automation, connect it with __CAPGO_KEEP_0__ Capgo CI/CD for the product workflow in Capgo CI/CD Capgo Native Builds for the product workflow in Capgo Native Builds Capgo Integrations for the product workflow in Capgo Integrations CI/CD 통합 CI/CD 통합 구현 세부 사항에 대해, GitHub 액션 통합 GitHub 액션 통합 구현 세부 사항에 대해.