Merge pull request #81 from jamesrochabrun/permission-mode-support #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to release (e.g., 1.0.0)' | |
| required: true | |
| type: string | |
| jobs: | |
| build-and-release: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Set version | |
| run: | | |
| if [ "${{ github.event_name }}" = "push" ]; then | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| else | |
| VERSION="${{ github.event.inputs.version }}" | |
| fi | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "Building version: $VERSION" | |
| - name: Install certificates | |
| env: | |
| CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }} | |
| CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
| run: | | |
| # Create temporary keychain | |
| KEYCHAIN_NAME="build.keychain" | |
| security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" | |
| security set-keychain-settings -lut 21600 "$KEYCHAIN_NAME" | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" | |
| # Import certificate | |
| echo "$CERTIFICATE_BASE64" | base64 --decode > certificate.p12 | |
| security import certificate.p12 -k "$KEYCHAIN_NAME" -P "$CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
| security set-key-partition-list -S apple-tool:,apple: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_NAME" | |
| # Set as default keychain | |
| security list-keychains -d user -s "$KEYCHAIN_NAME" | |
| security default-keychain -s "$KEYCHAIN_NAME" | |
| - name: Update version in Info.plist | |
| run: | | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${{ env.VERSION }}" "ClaudeCodeUI/Info.plist" | |
| BUILD_NUMBER=$(date +%Y%m%d%H%M) | |
| /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $BUILD_NUMBER" "ClaudeCodeUI/Info.plist" | |
| - name: Build app | |
| env: | |
| TEAM_ID: ${{ secrets.TEAM_ID }} | |
| run: | | |
| # Update export options with team ID | |
| sed -i '' "s/YOUR_TEAM_ID/$TEAM_ID/g" scripts/export_options.plist | |
| # Make script executable and run | |
| chmod +x scripts/build_app.sh | |
| ./scripts/build_app.sh | |
| - name: Create DMG | |
| run: | | |
| chmod +x scripts/create_dmg.sh | |
| ./scripts/create_dmg.sh | |
| - name: Notarize DMG | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APP_PASSWORD: ${{ secrets.APP_PASSWORD }} | |
| TEAM_ID: ${{ secrets.TEAM_ID }} | |
| run: | | |
| # Notarize the DMG | |
| xcrun notarytool submit "build/dmg/ClaudeCodeUI.dmg" \ | |
| --apple-id "$APPLE_ID" \ | |
| --password "$APP_PASSWORD" \ | |
| --team-id "$TEAM_ID" \ | |
| --wait | |
| # Staple the notarization ticket | |
| xcrun stapler staple "build/dmg/ClaudeCodeUI.dmg" | |
| - name: Generate release notes | |
| id: release_notes | |
| run: | | |
| echo "# ClaudeCodeUI v${{ env.VERSION }}" > release_notes.md | |
| echo "" >> release_notes.md | |
| echo "## Installation" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "1. Download ClaudeCodeUI.dmg" >> release_notes.md | |
| echo "2. Open the DMG file" >> release_notes.md | |
| echo "3. Drag ClaudeCodeUI to your Applications folder" >> release_notes.md | |
| echo "4. Launch ClaudeCodeUI from Applications" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "## Requirements" >> release_notes.md | |
| echo "- macOS 14.0 or later" >> release_notes.md | |
| echo "" >> release_notes.md | |
| echo "## What's New" >> release_notes.md | |
| echo "See commit history for changes" >> release_notes.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| name: ClaudeCodeUI v${{ env.VERSION }} | |
| tag_name: v${{ env.VERSION }} | |
| body_path: release_notes.md | |
| files: | | |
| build/dmg/ClaudeCodeUI.dmg | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload DMG artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ClaudeCodeUI-${{ env.VERSION }} | |
| path: build/dmg/ClaudeCodeUI.dmg |