Integrate it into your pipeline
The REST API and the CLI are part of Business and Enterprise. The API is wrapped by a lightweight CLI, so you do not script anything yourself. Your CI downloads the CLI with your API key, so there is nothing to install from a package registry. Save your API key and app ID as secrets (the dashboard shows both on its API keys page), add one step after your build, and keep your existing signing step. Optional auto-signing can return protected builds already signed. The command is the same everywhere:
# any CI, right after your build step (Node 22.23.4 or later): curl -fsSL -H "Authorization: Bearer $NULTR_API_KEY" \ https://api.nultr.com/cli -o nultr.mjs node nultr.mjs protect app-release.apk # # reads NULTR_API_KEY + NULTR_APP_ID from the environment and # writes app-release-protected.apk (sign it, or turn on # auto-signing to get it back already signed).
Pick your CI
# .github/workflows/release.yml
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Protect with nultr
id: nultr
env:
NULTR_API_KEY: ${{ secrets.NULTR_API_KEY }}
NULTR_APP_ID: ${{ secrets.NULTR_APP_ID }}
run: |
curl -fsSL -H "Authorization: Bearer $NULTR_API_KEY" https://api.nultr.com/cli -o nultr.mjs
echo "file=$(node nultr.mjs protect app/build/outputs/apk/release/app-release.apk)" >> "$GITHUB_OUTPUT"
# then sign ${{ steps.nultr.outputs.file }}, or enable auto-signing