Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Capgo Bundle Upload — GitHub Action

Capgo - Instant updates for capacitor

Upload a new Capacitor app **bundle** to **Capgo Cloud** from CI. Supports TUS uploads, delta updates, external URLs, S3 storage, and v2 signing.

Version must be > 0.0.0 and unique. Deleted versions cannot be reused.

Quick start

name: Upload bundle

on:
  push:
    branches: [main]

jobs:
  upload:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build web assets
        run: npm ci && npm run build

      - name: Upload to Capgo
        uses: ./
        with:
          apikey: ${{ secrets.CAPGO_API_KEY }}
          appId: com.example.app
          path: ./dist
          channel: production
          bundle: 1.2.3
          message: "CI release from ${GITHUB_SHA}"
          tus: "true"
          delta: "true"
          versionExistsOk: "true"

Inputs

Required

  • apikey — Capgo API key

Common

  • appId — App id (positional)
  • path — Folder to upload (defaults to webDir in capacitor.config)
  • channel — Channel to link to
  • bundle — Bundle version string
  • message — Release notes
  • link — External link

External bundle / encryption

  • external — External bundle URL
  • ivSessionKey — IV + session key
  • encryptedChecksum — Signature for external bundle

Signing (v2)

  • keyV2 — Path to private signing key
  • keyDataV2 — Private key content

Upload behavior

  • tus — Use TUS protocol
  • tusChunkSize — Chunk size in bytes
  • zip — Legacy zip upload
  • delta — Differential updates
  • deltaOnly — Only delta updates
  • encryptPartial — Encrypt delta files

Checks & metadata

  • noCodeCheck — Skip code checks
  • ignoreMetadataCheck — Skip metadata check
  • ignoreChecksumCheck — Skip checksum check

Min-update policy

  • minUpdateVersion — Minimal version required to update
  • autoMinUpdateVersion — Auto set from native packages

Compression

  • disableBrotli — Disable brotli compression
  • noBrotliPatterns — Comma-separated globs to exclude

S3

  • s3Region
  • s3Apikey
  • s3Apisecret
  • s3Endpoint
  • s3BucketName
  • s3Port
  • noS3Ssl

Misc

  • bundleUrl — Print bundle URL
  • noKey — Send clear update
  • displayIvSession — Log IV/session key
  • autoSetBundle — Write bundle back to capacitor.config.json
  • dryUpload — Dry run, no file upload
  • packageJson — Path to package.json
  • nodeModules — Path to node_modules
  • deleteLinkedBundleOnUpload — Delete linked bundle in channel
  • versionExistsOk — Exit success if bundle already exists
  • selfAssign — Allow devices to auto-join this channel
  • timeout — Upload timeout in seconds

Booleans must be strings: "true" or "false"

Example: External bundle URL

- name: Upload external bundle
  uses: ./
  with:
    apikey: ${{ secrets.CAPGO_API_KEY }}
    appId: com.example.app
    channel: beta
    external: https://my-cdn.com/app/1.2.3.tar.gz
    encryptedChecksum: ${{ secrets.EXTERNAL_SIGNATURE }}
    ivSessionKey: ${{ secrets.IV_SESSION_KEY }}
    bundle: 1.2.3

Example: S3-backed upload

- name: Upload via S3
  uses: ./
  with:
    apikey: ${{ secrets.CAPGO_API_KEY }}
    appId: com.example.app
    path: ./dist
    channel: production
    s3Region: eu-west-1
    s3Endpoint: https://s3.my-provider.com
    s3BucketName: capgo-bundles
    s3Apikey: ${{ secrets.S3_KEY }}
    s3Apisecret: ${{ secrets.S3_SECRET }}
    noS3Ssl: "false"
    tus: "true"
    delta: "true"

About

GitHub Action to deploy a Capacitor Live Update to the Capgo Cloud.

Resources

Code of conduct

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages