Skip to content

Release

Release #25

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version:
description: "Version to be released"
required: true
jobs:
release:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Validate Version
run: |
CLIX_VERSION_CONTENT=$(grep 'internal static let current: String = ' Sources/Core/ClixVersion.swift | sed 's/.*= "\(.*\)".*/\1/')
INPUT_VERSION="${{ github.event.inputs.version }}"
if [ "$CLIX_VERSION_CONTENT" != "$INPUT_VERSION" ]; then
echo "Error: Version mismatch!"
echo "ClixVersion.swift contains: '$CLIX_VERSION_CONTENT'"
echo "Input version is: '$INPUT_VERSION'"
echo "Please update the ClixVersion.swift file to match the release version."
exit 1
fi
echo "Version validation passed: $INPUT_VERSION"
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16"
- name: Read Changelog
id: read_changelog
if: ${{ !contains(github.event.inputs.version, 'beta') && !endsWith(github.event.inputs.version, 'SNAPSHOT') }}
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ github.event.inputs.version }}
- name: Create Release
if: steps.read_changelog.outputs.changes
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.version }}
name: ${{ github.event.inputs.version }}
body: ${{ steps.read_changelog.outputs.changes }}
commit: ${{ github.sha }}
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Release to CocoaPods
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: pod trunk push --allow-warnings Clix.podspec
generate-llms:
needs: release
uses: ./.github/workflows/generate-llms.yml
with:
llm_mode: changed
head: ${{ github.sha }}
secrets: inherit