Developer Platform

Automation

Schedules, triggers and CI/CD publishing

Automation turns manual dashboard work into repeatable pipelines — publish from CI, run scheduled jobs, and react to events without a human in the loop.

Publish from CI/CD

Give your pipeline a scoped API key (releases:write) and cut a release on every tagged build. GitHub Actions example:

name: Release to Theaimart
on:
  push:
    tags: ["v*"]
jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: ./scripts/build.sh
      - name: Upload build
        run: |
          curl -X POST https://api.theaimart.co/api/v1/apps/${{ vars.APP_ID }}/builds \
            -H "Authorization: Bearer ${{ secrets.THEAIMART_API_KEY }}" \
            -F "platform=linux" \
            -F "version=${GITHUB_REF_NAME#v}" \
            -F "file=@dist/app.AppImage"
      - name: Publish release
        run: |
          curl -X POST https://api.theaimart.co/api/v1/releases \
            -H "Authorization: Bearer ${{ secrets.THEAIMART_API_KEY }}" \
            -H "Content-Type: application/json" \
            -d "{\"listing_id\":\"${{ vars.APP_ID }}\",\"version\":\"${GITHUB_REF_NAME#v}\",\"channel\":\"beta\",\"rollout_percent\":10}"

Scheduled jobs

Create recurring tasks (digest emails, price experiments, cache warmups) with a cron expression:

curl -X POST https://api.theaimart.co/api/v1/automation/jobs \
  -H "Authorization: Bearer $THEAIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "weekly-rollout-widen",
    "schedule": "0 9 * * 1",
    "action": { "type": "release.widen", "listing_id": "app_123", "to_percent": 100 }
  }'

Event‑driven triggers

Chain webhooks to actions — e.g. when app.build.scanned returns ready, automatically promote the release; when a review.created is 1‑star, open a support ticket.

Keep automations idempotent and observable: log every run, alert on failures, and never let a scheduled job publish to stable at 100% without a prior staged rollout.

Safe‑publish pattern

  1. •CI uploads a build → wait for app.build.scanned: ready.
  2. •Publish to beta at 10%.
  3. •Scheduled job checks crash/review metrics after 24h.
  4. •If healthy, widen to stable 100%; else halt and alert.

Next