Skip to main content

CodePush デプロイメントの作成

概要

Create a CodePush deployment to get your deployment key. You need the deployment key to release CodePush updates to your apps.

Create a CodePush deployment to get your deployment key. You need the deployment key to release CodePush updates to your apps.

You can create a deployment either via the API or on the Release Management GUI.

GUI

API

  1. React Nativeプロジェクトごとに、次のものがあることを確認してください 2 つのアプリ リリース管理では、1 つは iOS 用、もう 1 つは Android 用です。

  2. Open your app in Release Management.

  3. On the left, select Configuration.

    20251216-configuration-rm.png
  4. Select Deployments.

  5. Click New deployment.

  6. Enter a name.

    If you have multiple deployments, each must have a unique name. We recommend including the target of the deployment in the name (for example, Staging Deployment).

  7. In the Deployment key field, you can paste an existing deployment key.

    If you leave it blank, Bitrise generates a secure deployment key for you.

  1. 必ずお持ちください 個人アクセストークン または ワークスペース API トークン

    リリース管理 API による認証にはトークンが必要です。

  2. React Nativeプロジェクトごとに、次のものがあることを確認してください 2 つのアプリ リリース管理では、1 つは iOS 用、もう 1 つは Android 用です。

  3. Get the app ID for each app. You can see it in the URL of the app page: https://app.bitrise.io/release-management/workspaces/<worskspace-id>/connected-apps/<connected-app-id>.

    API からの ID

    あなたはできる API を使用してアプリを追加できます。。の応答 /connected-apps エンドポイントには id フィールド:これは必要なアプリ ID です。

  4. を呼び出して、各アプリケーションの CodePush デプロイメントを作成します。 /connected-apps/{connected_app_id}/code-push/deployments エンドポイント。リクエストには以下が必要です。

    • 接続アプリケーション ID。

    • 認証用のトークン。

    • デプロイに使用する名前。

    この例では、という名前を使用しています prod:

     curl -X 'POST' \
      'https://api.bitrise.io/release-management/v1/connected-apps/<connected-app-id>/code-push/deployments' \
      -H 'accept: application/json' \
      -H 'authorization: <access-token>' \
      -H 'Content-Type: application/json' \
      -d '{
        "name": "prod"
      }'

    既存のデプロイメントキー

    すでにお持ちの場合 deploymentKey (たとえば、Microsoft アプリセンターからセットアップを移行する場合)、以下を使用できます。 key API リクエストのパラメータ:

    {
        "name": "prod",
        "key": "<existing-deploymentKey>"
    }
  5. base64 でエンコードされたものをコピーする key レスポンスで返されました。これは CodePush デプロイキーです。これが必要なのは アプリケーションを CodePush 用に構成してください。