Skip to main content

Creating a CodePush deployment

Abstract

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.

Public beta

Bitrise CodePush is currently in public beta. Contact us so we can enable the feature for you.

The public beta includes 100000 push updates per month. If you need more, contact us!

  1. Make sure you have a personal access token or a workspace API token.

    A token is required for authorization with the Release Management API.

  2. For each React Native project, make sure you have two apps in Release Management: one for iOS, one for 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>.

    ID from the API

    You can use the API to add apps. The response of the /connected-apps endpoint contains an id field: this is the app ID you need.

  4. Create a CodePush deployment for each app by calling the /connected-apps/{connected_app_id}/code-push/deployments endpoint. The request requires:

    • The connected app ID.

    • A token for authorization.

    • A name you will use for the deployment.

    In this example, we're using the name 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"
      }'

    Existing deploymentKey

    If you already have a deploymentKey (for example, if you are migrating your setup from Microsoft App Center), you can use the key parameter in the API request:

    {
        "name": "prod",
        "key": "<existing-deploymentKey>"
    }
  5. Copy the base64-encoded key returned in the response. This is the CodePush deployment key: you need this to configure your app for CodePush.