Fix app name to consistently use 'GitHub Copilot' #11
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: Build macOS App | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: # Allows manual triggering from GitHub UI | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Xcode | |
uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 'latest-stable' | |
- name: Set environment variables | |
run: | | |
if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
else | |
# Extract short SHA for development builds | |
echo "RELEASE_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
fi | |
- name: Build macOS App | |
run: | | |
# Get available schemes | |
echo "Available schemes:" | |
xcodebuild -list -project CopilotApp.xcodeproj | |
# Build without code signing for CI and specify derivedDataPath to know exact output location | |
xcodebuild -project CopilotApp.xcodeproj -scheme CopilotApp -configuration Release -destination 'platform=macOS' -derivedDataPath ./DerivedData clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | |
- name: Create .app package | |
run: | | |
# Create the output directory | |
mkdir -p dist | |
# Debug: Show all files in the derived data directory | |
echo "Contents of DerivedData directory:" | |
find ./DerivedData -type d -name "*.app" | sort | |
# Find the app using find command | |
APP_PATH=$(find ./DerivedData -type d -name "GitHub Copilot.app" | head -n 1) | |
if [ -z "$APP_PATH" ]; then | |
echo "Could not find 'GitHub Copilot.app', trying alternative names..." | |
APP_PATH=$(find ./DerivedData -type d -name "*.app" | head -n 1) | |
fi | |
if [ -z "$APP_PATH" ]; then | |
echo "ERROR: Could not find any .app bundle in the build output" | |
find ./DerivedData -type d | sort | |
exit 1 | |
fi | |
echo "Found app at: $APP_PATH" | |
cp -R "$APP_PATH" dist/ | |
cd dist | |
# Remove extended attributes that might cause "damaged" errors | |
echo "Removing extended attributes from app bundle..." | |
xattr -cr "GitHub Copilot.app" | |
# Compress the .app bundle | |
APP_NAME=$(basename "$APP_PATH") | |
zip -r "GitHubCopilotApp-$RELEASE_VERSION.zip" "$APP_NAME" | |
ls -la | |
- name: Upload app as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: GitHubCopilotApp | |
path: dist/GitHubCopilotApp-*.zip | |
# Only run this step for tagged releases | |
- name: Create GitHub Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/GitHubCopilotApp-*.zip | |
draft: true | |
prerelease: false | |
generate_release_notes: true | |
body: | | |
## GitHub Copilot App | |
A simple macOS application that provides a clean wrapper for GitHub Copilot's web interface. | |
### Installation | |
1. Download the zip file attached to this release | |
2. Extract and move GitHub Copilot.app to your Applications folder | |
3. Right-click and select "Open" the first time you run it (to bypass Gatekeeper) | |
### Troubleshooting: "App is damaged" Error | |
If you see a message saying the app is "damaged and can't be opened": | |
1. Open Terminal and run this command: | |
``` | |
xattr -cr /Applications/GitHub\ Copilot.app | |
``` | |
2. Try opening the app again | |
This happens because the app isn't signed with an Apple Developer certificate. The command removes quarantine attributes that macOS adds to downloaded files. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |