Codemagic

Publish patches from Codemagic.

Set up the secrets

  1. Get a token

    Run overpush token where the project works. See Continuous integration.

  2. Add an environment group

    In Codemagic, open the app's Environment variables, add OVERPUSH_TOKEN and OVERPUSH_API_BASE as secure variables, and put them in a group called overpush.

codemagic.yaml

workflows:
  patch-android:
    name: Patch Android
    instance_type: linux_x2
    environment:
      flutter: 3.41.4          # the version that built the release
      groups:
        - overpush
    scripts:
      - name: Install OverPush
        script: curl -fsSL https://overpush.in/install.sh | bash
      - name: Publish the patch
        script: |
          flutter pub get
          ~/.overpush/bin/overpush patch android --yes --rollout-percent 10
workflows:
  patch-ios:
    name: Patch iOS
    instance_type: mac_mini_m2
    environment:
      flutter: 3.41.4          # the version that built the release
      xcode: latest
      groups:
        - overpush
    scripts:
      - name: Install OverPush
        script: curl -fsSL https://overpush.in/install.sh | bash
      - name: Publish the patch
        script: |
          flutter pub get
          ~/.overpush/bin/overpush patch ios --yes --rollout-percent 10

Start the workflow by hand from Codemagic, or add a triggering section to run it on a tag.