# How to Set Up CI/CD Pipelines for Palmier Pro: A Complete GitHub Actions Guide

> Automate Palmier Pro releases by setting up CI/CD pipelines with GitHub Actions. Learn to build, test, and publish your macOS DMG artifact efficiently.

- Repository: [Palmier/palmier-pro](https://github.com/palmier-io/palmier-pro)
- Tags: how-to-guide
- Published: 2026-06-21

---

**Configure a GitHub Actions workflow using a macOS runner to execute `swift test`, run `swift build -c release`, invoke [`scripts/bundle.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/bundle.sh) to generate a DMG, and publish the artifact via [`scripts/release.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/release.sh) to automate Palmier Pro releases.**

Palmier Pro is a Swift 6.2 macOS video editor built with Swift Package Manager (SPM). Setting up CI/CD pipelines for this repository ensures that every commit triggers automated testing, compilation, and distribution workflows. By leveraging the existing shell scripts in `scripts/` and the Swift toolchain, you can create a robust pipeline that handles the entire release lifecycle from code validation to DMG distribution.

## Prerequisites and Repository Structure

Before configuring the pipeline, ensure your environment matches the repository requirements. The [`Package.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Package.swift) file declares Swift 6.2 as the minimum version, and the application targets macOS 26 on Apple Silicon architectures.

Key dependencies include:

- **Swift 6.2** (specified in [`Package.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Package.swift))
- **macOS 14+ runner** (required for Apple Silicon compatibility)
- **Python 3.12+** (for the SigLIP model dependencies listed in [`models/siglip2/requirements.txt`](https://github.com/palmier-io/palmier-pro/blob/main/models/siglip2/requirements.txt))

The repository provides three critical automation scripts:

- [`scripts/bundle.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/bundle.sh) – Packages the built binary into a distributable DMG
- [`scripts/release.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/release.sh) – Handles Git tagging and GitHub Release creation
- [`scripts/dev.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/dev.sh) – Development utility (optional for CI)

## The Three-Stage CI/CD Pipeline

An effective CI/CD pipeline for Palmier Pro consists of three distinct stages that map to the repository's build architecture.

**Stage 1: Build and Test**

The pipeline begins by running the Swift test suite located in `Tests/PalmierProTests/`. This includes specific test files like [`TimeFormattingTests.swift`](https://github.com/palmier-io/palmier-pro/blob/main/TimeFormattingTests.swift) and [`ExportServiceRoundTripTests.swift`](https://github.com/palmier-io/palmier-pro/blob/main/ExportServiceRoundTripTests.swift) that validate core functionality. The command `swift test` executes these validations and aborts the pipeline on failure.

**Stage 2: Package**

Upon successful test completion, the pipeline compiles the release binary using `swift build -c release`. The [`scripts/bundle.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/bundle.sh) script then processes this binary to create a versioned DMG file in the `build/` directory.

**Stage 3: Release**

The final stage uploads the generated DMG as a GitHub Release artifact. The [`scripts/release.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/release.sh) script (or native `gh` CLI commands) creates a version tag and publishes the release notes with the binary attachment.

## Implementing the GitHub Actions Workflow

Create [`.github/workflows/ci.yml`](https://github.com/palmier-io/palmier-pro/blob/main/.github/workflows/ci.yml) in the repository root to automate these stages. The configuration uses a macOS runner to ensure compatibility with the Swift 6.2 toolchain and Apple Silicon architecture.

### Workflow Configuration and Environment Setup

The workflow triggers on pushes to `main` and pull requests. It uses `actions/checkout@v4` to retrieve the codebase and `swift-actions/setup-swift@v2` to ensure Swift 6.2 availability.

### Python Dependency Installation

Before running Swift tests, install the Python requirements for the AI models:

```yaml
- name: Install Python dependencies
  uses: actions/setup-python@v5
  with:
    python-version: '3.12'

- name: Install siglip requirements
  run: |
    python -m pip install --upgrade pip
    pip install -r models/siglip2/requirements.txt

```

### Swift Testing Phase

Execute the comprehensive test suite:

```yaml
- name: Run Swift tests
  run: swift test

```

This command runs all tests under `Tests/PalmierProTests/`, including [`ExportResolutionTests.swift`](https://github.com/palmier-io/palmier-pro/blob/main/ExportResolutionTests.swift) and other validation suites.

### Release Build and DMG Packaging

Compile the release binary and invoke the bundling script:

```yaml
- name: Build Release binary
  run: swift build -c release

- name: Create DMG
  env:
    VERSION: ${{ github.sha }}
  run: |
    chmod +x scripts/bundle.sh
    ./scripts/bundle.sh $VERSION

```

The [`scripts/bundle.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/bundle.sh) script generates `build/PalmierPro-{VERSION}.dmg` using the compiled release binary.

### Artifact Publishing and Release

Upload the DMG and create a GitHub Release:

```yaml
- name: Upload DMG artifact
  uses: actions/upload-artifact@v4
  with:
    name: palmierpro-dmg
    path: ./build/*.dmg

- name: Create Git tag and Release
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: |
    TAG=v$(date +%Y.%m.%d).${{ github.run_number }}
    git config user.name "github-actions"
    git config user.email "github-actions@github.com"
    git tag $TAG
    git push origin $TAG
    gh release create $TAG ./build/*.dmg \
      --title "Palmier Pro $TAG" \
      --notes "Automated build from commit ${{ github.sha }}."

```

## Complete Workflow File

Here is the complete [`.github/workflows/ci.yml`](https://github.com/palmier-io/palmier-pro/blob/main/.github/workflows/ci.yml) configuration:

```yaml
name: CI / CD

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  workflow_dispatch: {}

jobs:
  build-test:
    runs-on: macos-14
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Swift
        uses: swift-actions/setup-swift@v2
        with:
          swift-version: '6.2'

      - name: Install Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install siglip requirements
        run: |
          python -m pip install --upgrade pip
          pip install -r models/siglip2/requirements.txt

      - name: Run Swift tests
        run: swift test

      - name: Build Release binary
        run: swift build -c release

      - name: Create DMG
        env:
          VERSION: ${{ github.sha }}
        run: |
          chmod +x scripts/bundle.sh
          ./scripts/bundle.sh $VERSION

      - name: Upload DMG artifact
        uses: actions/upload-artifact@v4
        with:
          name: palmierpro-dmg
          path: ./build/*.dmg

  release:
    needs: build-test
    runs-on: macos-14
    if: github.ref == 'refs/heads/main'
    steps:
      - name: Download DMG artifact
        uses: actions/download-artifact@v4
        with:
          name: palmierpro-dmg
          path: ./release

      - name: Create Git tag
        id: tag
        run: |
          TAG=v$(date +%Y.%m.%d).${{ github.run_number }}
          echo "tag=$TAG" >> $GITHUB_OUTPUT
          git config user.name "github-actions"
          git config user.email "github-actions@github.com"
          git tag $TAG
          git push origin $TAG

      - name: Publish GitHub Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gh release create ${{ steps.tag.outputs.tag }} ./release/*.dmg \
            --title "Palmier Pro ${{ steps.tag.outputs.tag }}" \
            --notes "Automated build from commit ${{ github.sha }}."

```

## Local Testing Commands

Validate the pipeline steps locally before committing:

Run the test suite:

```bash
swift test --filter PalmierProTests/Export/ExportResolutionTests

```

Build and package locally:

```bash
chmod +x scripts/bundle.sh
./scripts/bundle.sh 1.0.0

```

Create a local release:

```bash
chmod +x scripts/release.sh
./scripts/release.sh 1.0.0

```

## Summary

- **Swift 6.2 Requirement**: The [`Package.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Package.swift) file specifies Swift 6.2, requiring macOS 14+ runners for CI/CD pipelines for Palmier Pro.
- **Three-Stage Automation**: The pipeline runs `swift test` for validation, `swift build -c release` for compilation, and [`scripts/bundle.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/bundle.sh) for DMG creation.
- **Python Integration**: Install dependencies from [`models/siglip2/requirements.txt`](https://github.com/palmier-io/palmier-pro/blob/main/models/siglip2/requirements.txt) before executing Swift tests to ensure AI model compatibility.
- **Script-Based Packaging**: The repository's [`scripts/bundle.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/bundle.sh) and [`scripts/release.sh`](https://github.com/palmier-io/palmier-pro/blob/main/scripts/release.sh) handle platform-specific packaging and distribution logic.
- **macOS-Only**: Palmier Pro requires Apple Silicon macOS runners; cross-platform workflows are not supported.

## Frequently Asked Questions

### What macOS runner version is required for Palmier Pro CI/CD?

You must use **macOS 14 or later** (Apple Silicon) as specified in the workflow `runs-on: macos-14`. This ensures compatibility with Swift 6.2 and the arm64 architecture targeted by the [`Package.swift`](https://github.com/palmier-io/palmier-pro/blob/main/Package.swift) configuration.

### How are Python dependencies handled in the CI pipeline?

The pipeline installs Python 3.12 and executes `pip install -r models/siglip2/requirements.txt` before running `swift test`. This step is required because the video editor depends on the SigLIP model files located in the `models/siglip2/` directory.

### Can I test the DMG creation process locally without GitHub Actions?

Yes. Run `chmod +x scripts/bundle.sh` followed by `./scripts/bundle.sh <version>` from the repository root. This executes the same packaging logic used in the CI/CD pipeline, producing a DMG in the `build/` directory.

### Which test files are executed during the CI testing phase?

The `swift test` command runs all test targets defined in `Tests/PalmierProTests/`, including [`TimeFormattingTests.swift`](https://github.com/palmier-io/palmier-pro/blob/main/TimeFormattingTests.swift), [`ExportServiceRoundTripTests.swift`](https://github.com/palmier-io/palmier-pro/blob/main/ExportServiceRoundTripTests.swift), and [`ExportResolutionTests.swift`](https://github.com/palmier-io/palmier-pro/blob/main/ExportResolutionTests.swift). These validate core video editing functionality before release builds proceed.