Github Actions
CallstackOfficialPublished by Callstack
- Skill
- Tool integration
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a set of composite GitHub Actions and workflow patterns designed to streamline the CI process for React Native applications. It enables developers to automate the building of iOS simulator apps and Android emulator APKs directly within GitHub Actions. The patterns include logic for artifact naming, automated upload, and standardized retrieval methods using the GitHub CLI or REST API, facilitating easier testing and QA workflows.
What it does
- Provides composite actions for building React Native iOS simulator apps.
- Provides composite actions for building React Native Android emulator APKs.
- Automates the upload of build artifacts to GitHub Actions storage.
- Standardizes artifact naming conventions for easier identification.
- Enables programmatic retrieval of build artifacts via GitHub CLI or REST API.
- Supports dynamic identifier generation based on PR numbers or commit SHAs.
When to use it
- When setting up CI/CD pipelines for React Native mobile projects.
- When you need to provide downloadable simulator or emulator builds for QA teams.
- When you want to replace manual local builds with automated cloud-based CI artifacts.
- When you require stable artifact IDs for scripted download processes.
Advantages
- Reduces manual effort by automating mobile build processes in the cloud.
- Ensures consistent build environments for mobile artifacts.
- Simplifies artifact management with standardized naming and retention.
- Integrates seamlessly with existing GitHub Actions and CLI workflows.
Usage examples
- “How do I build an Android emulator APK in my GitHub Actions workflow?”
- You can use the provided Android composite action in your workflow file, which handles the Gradle build process and uploads the resulting APK as a named artifact.
- “How can I download the latest iOS simulator build from my CI pipeline?”
- After the build job completes, you can use the 'gh run download' command or the GitHub REST API to fetch the artifact using the stable ID generated by the composite action.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/callstackincubator/github-actions/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip github-actions.zip -d .agents/skills
Documentation by Callstack
GitHub Actions Build Artifacts
Overview
Reusable GitHub Actions patterns to build React Native apps for iOS simulators and Android emulators in the cloud, then publish artifacts retrievable via gh CLI or GitHub API.
When to Apply
Use this skill when:
Creating CI workflows that build React Native simulator/emulator artifacts.
Uploading iOS simulator and Android emulator installables from PRs or manual dispatch runs.
Replacing local-only mobile builds with downloadable CI artifacts.
Needing stable artifact IDs/names for scripted retrieval with
ghor REST API.
Quick Reference
Add composite actions from gha-ios-composite-action.md and gha-android-composite-action.md.
Wire them into
.github/workflows/mobile-build.ymlfrom gha-workflow-and-downloads.md.Upload with
actions/upload-artifact@v4and captureartifact-idoutput.Download with
gh run downloadorGET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}.
References
| File | Description |
|---|---|
| gha-ios-composite-action.md | Composite action.yml for iOS simulator .app.tar.gz builds and artifact upload |
| gha-android-composite-action.md | Composite action.yml for Android emulator .apk builds and artifact upload |
| gha-workflow-and-downloads.md | End-to-end workflow wiring plus gh and REST download commands |
Problem -> Skill Mapping
| Problem | Start With |
|---|---|
Need CI iOS simulator .app.tar.gz artifact | gha-ios-composite-action.md |
Need CI Android emulator .apk artifact | gha-android-composite-action.md |
| Need one workflow to trigger both platform jobs | gha-workflow-and-downloads.md |
| Need scripted artifact download | gha-workflow-and-downloads.md |
Source Inspiration
Files
- ATTRIBUTION.mdAdded by AutoGineer847 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md2.7 KiB
- agents/openai.yaml269 B
- references/gha-android-composite-action.md5.3 KiB
- references/gha-ios-composite-action.md7.4 KiB
- references/gha-workflow-and-downloads.md9.7 KiB
references/gha-workflow-and-downloads.md
title: Workflow Wiring and Artifact Downloads impact: CRITICAL tags: github-actions, workflow, artifacts, gh-cli, rest-api, simulator, emulator
Skill: Workflow Wiring and Artifact Downloads
Use this workflow to run iOS simulator and Android emulator builds in cloud CI and expose artifact metadata for scripted retrieval.
Minimum Required Inputs
Set these before first run:
iOS scheme: exact Xcode scheme name (for example
YourApp).Android variant: Gradle variant for emulator artifacts (usually
Debug).Branch strategy: branches for
pushandpull_requesttriggers (default below usesmain).Retention days: artifact retention period passed to upload steps (for example
7).
Repo-Compat Checklist (Before First Run)
Confirm the iOS scheme exists and builds locally.
Confirm
pod installworks in CI context from iOS source dir.Confirm
android/gradlewis executable (chmod +x android/gradlewif needed).Confirm
npx react-native configresolves validproject.ios.sourceDirandproject.android.sourceDir.
Quick Config
Create
.github/workflows/mobile-build.yml.Call local composite actions from this skill (
github-actions/ios-build,github-actions/android-build).Keep
actions/upload-artifact@v4output IDs.Retrieve with
gh run downloadorgh api.
When to Use
Need one pipeline for simulator/emulator artifacts.
Need PR, push, and manual dispatch triggers.
Need deterministic artifact retrieval in CI/CD or external tooling.
Workflow Template (.github/workflows/mobile-build.yml)
name: RN Cloud Build
on:
# Baseline trigger strategy: validate incoming changes and direct branch updates.
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
ios_scheme:
description: iOS scheme name
required: true
default: YourApp
type: string
ios_configuration:
description: iOS configuration
required: true
default: Debug
type: string
android_variant:
description: Android Gradle variant
required: true
default: Debug
type: string
artifact_retention_days:
description: Artifact retention days
required: true
default: '7'
type: string
permissions:
contents: read
actions: read
env:
IOS_SCHEME: YourApp
IOS_CONFIGURATION: Debug
ANDROID_VARIANT: Debug
ARTIFACT_RETENTION_DAYS: '7'
jobs:
ios:
name: iOS simulator build
runs-on: macos-latest
outputs:
artifact_name: ${{ steps.build.outputs.artifact-name }}
artifact_id: ${{ steps.build.outputs.artifact-id }}
artifact_url: ${{ steps.build.outputs.artifact-url }}
steps:
- uses: actions/checkout@v4
- name: Resolve Node version from package.json engines
id: node-version
run: |
set -euo pipefail
NODE_SPEC="$(python3 - <<'PY'
import json
from pathlib import Path
pkg = Path('package.json')
if not pkg.exists():
print('22')
else:
data = json.loads(pkg.read_text())
print((data.get('engines', {}).get('node') or '22').strip())
PY
)"
echo "value=$NODE_SPEC" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.value }}
cache: npm
- name: Install JS dependencies
run: npm ci
- name: Install CocoaPods dependencies
run: |
set -euo pipefail
IOS_SOURCE_DIR="$(npx react-native config | node -e "const fs=require('fs');const j=JSON.parse(fs.readFileSync(0,'utf8'));process.stdout.write(j.project?.ios?.sourceDir || 'ios')")"
cd "$IOS_SOURCE_DIR"
pod install --repo-update
# Optional: only add ruby/setup-ruby when this repo enforces Ruby tooling
# (for example via .ruby-version and Bundler workflow).
# - uses: ruby/setup-ruby@v1
# with:
# bundler-cache: true
- name: Resolve iOS inputs
id: ios-inputs
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "scheme=${{ inputs.ios_scheme }}" >> "$GITHUB_OUTPUT"
echo "config=${{ inputs.ios_configuration }}" >> "$GITHUB_OUTPUT"
echo "retention=${{ inputs.artifact_retention_days }}" >> "$GITHUB_OUTPUT"
else
echo "scheme=${{ env.IOS_SCHEME }}" >> "$GITHUB_OUTPUT"
echo "config=${{ env.IOS_CONFIGURATION }}" >> "$GITHUB_OUTPUT"
echo "retention=${{ env.ARTIFACT_RETENTION_DAYS }}" >> "$GITHUB_OUTPUT"
fi
- name: Build iOS simulator
id: build
uses: ./.github/actions/github-actions/ios-build
with:
scheme: ${{ steps.ios-inputs.outputs.scheme }}
configuration: ${{ steps.ios-inputs.outputs.config }}
artifact-prefix: rn-ios-simulator
artifact-retention-days: ${{ steps.ios-inputs.outputs.retention }}
android:
name: Android emulator build
runs-on: ubuntu-latest
outputs:
artifact_name: ${{ steps.build.outputs.artifact-name }}
artifact_id: ${{ steps.build.outputs.artifact-id }}
artifact_url: ${{ steps.build.outputs.artifact-url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: gradle
- name: Resolve Node version from package.json engines
id: node-version
run: |
set -euo pipefail
NODE_SPEC="$(python3 - <<'PY'
import json
from pathlib import Path
pkg = Path('package.json')
if not pkg.exists():
print('22')
else:
data = json.loads(pkg.read_text())
print((data.get('engines', {}).get('node') or '22').strip())
PY
)"
echo "value=$NODE_SPEC" >> "$GITHUB_OUTPUT"
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.value }}
cache: npm
- name: Install JS dependencies
run: npm ci
- name: Resolve Android inputs
id: android-inputs
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "variant=${{ inputs.android_variant }}" >> "$GITHUB_OUTPUT"
echo "retention=${{ inputs.artifact_retention_days }}" >> "$GITHUB_OUTPUT"
else
echo "variant=${{ env.ANDROID_VARIANT }}" >> "$GITHUB_OUTPUT"
echo "retention=${{ env.ARTIFACT_RETENTION_DAYS }}" >> "$GITHUB_OUTPUT"
fi
- name: Build Android emulator APK
id: build
uses: ./.github/actions/github-actions/android-build
with:
variant: ${{ steps.android-inputs.outputs.variant }}
artifact-prefix: rn-android-emulator
artifact-retention-days: ${{ steps.android-inputs.outputs.retention }}
summary:
name: Build summary
runs-on: ubuntu-latest
needs: [ios, android]
steps:
- name: Publish artifact metadata
run: |
{
echo "## RN Cloud Build Artifacts"
echo ""
echo "- iOS simulator (.app.tar.gz): name=${{ needs.ios.outputs.artifact_name }}, id=${{ needs.ios.outputs.artifact_id }}"
echo "- Android emulator (.apk): name=${{ needs.android.outputs.artifact_name }}, id=${{ needs.android.outputs.artifact_id }}"
echo ""
echo "Artifact URLs (auth required):"
echo "- iOS: ${{ needs.ios.outputs.artifact_url }}"
echo "- Android: ${{ needs.android.outputs.artifact_url }}"
} >> "$GITHUB_STEP_SUMMARY"CocoaPods and Ruby Notes
Run
pod installfromios/or fromproject.ios.sourceDirresolved vianpx react-native config.Do not assume Bundler or pinned Ruby is always required.
ruby/setup-rubyis optional and should be added only when repo policy enforces Ruby tooling (for example.ruby-versionand Bundler-managed pods).
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
ruby/setup-ruby or Bundler fails | Repo does not require Ruby toolchain in CI | Remove Ruby setup and run plain pod install |
xcodebuild: Scheme ... not found | Wrong iOS scheme value | Use exact shared scheme from Xcode project/workspace |
Task ':app:assembledebug' not found | Wrong Android variant casing | Use Gradle-style casing (Debug, Release, StagingDebug) |
pod install --repo-update is slow or flaky | CocoaPods spec repo updates | Retry, cache Pods, or drop --repo-update when lockfile + mirror are stable |
Download Artifacts with gh
# 1) Find recent runs for this workflow
gh run list --workflow "RN Cloud Build" --limit 10
# 2) Download by run id + artifact name
gh run download <run-id> -n <artifact-name> -D ./artifacts
# 3) Inspect artifacts for a run (IDs + names)
gh api repos/<owner>/<repo>/actions/runs/<run-id>/artifacts \
--jq '.artifacts[] | {id, name, size_in_bytes, expired}'Download Artifacts with Direct REST API
# List repo artifacts
curl -sS \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/<owner>/<repo>/actions/artifacts" | jq '.artifacts[] | {id, name}'
# Download one artifact zip by ID
curl -L \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/<owner>/<repo>/actions/artifacts/<artifact-id>/zip" \
-o artifact.zipCommon Pitfalls
Forgetting to set
permissions.actions: readfor API-driven artifact listing.Assuming artifact URLs are public; they require authenticated access.
Not pinning artifact names, making
gh run download -nbrittle.
Related Skills
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Callstack
- Publisher
- Callstack (Official)
- Source
- callstackincubator/agent-skills · skills/github-actions · commit 59e9d17
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Callstack or Callstack.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download github-actions.zip