Skip to content
CodeOnAir
Docs menu

Integration via CI/CD

Release CodePush updates automatically from GitHub Actions, GitLab CI or any CI with a CODEONAIR_ACCESS_KEY secret.

In CI, skip login: create an access key just for CI (e.g. “GitHub Actions”), store it as a secret, and pass it as CODEONAIR_ACCESS_KEY.

GitHub Actions#

.github/workflows/codepush.yml
name: CodePush
on:
  push:
    branches: [main]
jobs:
  release:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 20 }
      - run: npm ci
      - run: npm install -g @codeonair/code-push-cli@beta
      - run: codeonair-codepush release-react shop-android -t 1.0.0 -d "${{ github.sha }}"
        env:
          CODEONAIR_ACCESS_KEY: ${{ secrets.CODEONAIR_ACCESS_KEY }}
          CODEONAIR_SERVER_URL: https://app.codeonair.com
      - run: codeonair-codepush release-react shop-ios -t 1.0.0 -d "${{ github.sha }}"
        env:
          CODEONAIR_ACCESS_KEY: ${{ secrets.CODEONAIR_ACCESS_KEY }}
          CODEONAIR_SERVER_URL: https://app.codeonair.com

GitLab CI#

.gitlab-ci.yml
codepush:
  image: node:20
  only: [main]
  variables:
    CODEONAIR_SERVER_URL: https://app.codeonair.com
  script:
    - npm ci
    - npm install -g @codeonair/code-push-cli@beta
    - codeonair-codepush release-react shop-android -t 1.0.0 -d "$CI_COMMIT_SHORT_SHA"

Add CODEONAIR_ACCESS_KEY under Settings → CI/CD → Variables, masked and protected.

Good habits#

  • Release to a share first (--rollout 20) and raise it with patch --rollout 100 once the dashboard shows no rollbacks.
  • Use the commit SHA as the description so every release maps to code.
  • Revoke the CI key from your account menu → CLI access keys if the runner is ever compromised.
Stuck? Write to support@codeonair.com with your App ID and what you tried — we reply within a working day.