Generated banner for Github Actions
Generated logo for Github Actions

Github Actions

CallstackOfficialPublished by Callstack

  • Skill
  • Tool integration
  • Software development
  • MIT
  • No issues found

From the author

GitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipelines or downloading GitHub Actions artifacts via gh CLI and GitHub API.
— the description by Callstack

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

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/callstackincubator/github-actions/download
  2. Unzip 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 gh or REST API.

Quick Reference

  1. Add composite actions from gha-ios-composite-action.md and gha-android-composite-action.md.

  2. Wire them into .github/workflows/mobile-build.yml from gha-workflow-and-downloads.md.

  3. Upload with actions/upload-artifact@v4 and capture artifact-id output.

  4. Download with gh run download or GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}.

References

FileDescription
gha-ios-composite-action.mdComposite action.yml for iOS simulator .app.tar.gz builds and artifact upload
gha-android-composite-action.mdComposite action.yml for Android emulator .apk builds and artifact upload
gha-workflow-and-downloads.mdEnd-to-end workflow wiring plus gh and REST download commands

Problem -> Skill Mapping

ProblemStart With
Need CI iOS simulator .app.tar.gz artifactgha-ios-composite-action.md
Need CI Android emulator .apk artifactgha-android-composite-action.md
Need one workflow to trigger both platform jobsgha-workflow-and-downloads.md
Need scripted artifact downloadgha-workflow-and-downloads.md

Source Inspiration

Files

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 push and pull_request triggers (default below uses main).

  • 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 install works in CI context from iOS source dir.

  • Confirm android/gradlew is executable (chmod +x android/gradlew if needed).

  • Confirm npx react-native config resolves valid project.ios.sourceDir and project.android.sourceDir.

Quick Config

  1. Create .github/workflows/mobile-build.yml.

  2. Call local composite actions from this skill (github-actions/ios-build, github-actions/android-build).

  3. Keep actions/upload-artifact@v4 output IDs.

  4. Retrieve with gh run download or gh 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 install from ios/ or from project.ios.sourceDir resolved via npx react-native config.

  • Do not assume Bundler or pinned Ruby is always required.

  • ruby/setup-ruby is optional and should be added only when repo policy enforces Ruby tooling (for example .ruby-version and Bundler-managed pods).

Troubleshooting

SymptomLikely CauseFix
ruby/setup-ruby or Bundler failsRepo does not require Ruby toolchain in CIRemove Ruby setup and run plain pod install
xcodebuild: Scheme ... not foundWrong iOS scheme valueUse exact shared scheme from Xcode project/workspace
Task ':app:assembledebug' not foundWrong Android variant casingUse Gradle-style casing (Debug, Release, StagingDebug)
pod install --repo-update is slow or flakyCocoaPods spec repo updatesRetry, 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.zip

Common Pitfalls

  • Forgetting to set permissions.actions: read for API-driven artifact listing.

  • Assuming artifact URLs are public; they require authenticated access.

  • Not pinning artifact names, making gh run download -n brittle.

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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download github-actions.zip