|
| 1 | +name: Build and Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + name: Build macOS App |
| 11 | + runs-on: macos-latest |
| 12 | + |
| 13 | + steps: |
| 14 | + - name: Checkout code |
| 15 | + uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Select Xcode version |
| 18 | + run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer |
| 19 | + |
| 20 | + - name: Show Xcode version |
| 21 | + run: xcodebuild -version |
| 22 | + |
| 23 | + - name: Build app |
| 24 | + run: | |
| 25 | + xcodebuild -project forks.xcodeproj \ |
| 26 | + -scheme forks \ |
| 27 | + -configuration Release \ |
| 28 | + -derivedDataPath build \ |
| 29 | + -arch arm64 -arch x86_64 \ |
| 30 | + ONLY_ACTIVE_ARCH=NO \ |
| 31 | + CODE_SIGN_IDENTITY="-" \ |
| 32 | + CODE_SIGNING_REQUIRED=NO \ |
| 33 | + CODE_SIGNING_ALLOWED=NO \ |
| 34 | + build |
| 35 | + |
| 36 | + - name: Create app bundle |
| 37 | + run: | |
| 38 | + APP_PATH="build/Build/Products/Release/forks.app" |
| 39 | + if [ -d "$APP_PATH" ]; then |
| 40 | + cd build/Build/Products/Release |
| 41 | + zip -r forks-macos.zip forks.app |
| 42 | + mv forks-macos.zip ../../../../ |
| 43 | + else |
| 44 | + echo "App bundle not found at $APP_PATH" |
| 45 | + find build -name "*.app" -type d |
| 46 | + exit 1 |
| 47 | + fi |
| 48 | + |
| 49 | + - name: Get tag name |
| 50 | + id: tag |
| 51 | + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
| 52 | + |
| 53 | + - name: Create Release |
| 54 | + uses: softprops/action-gh-release@v1 |
| 55 | + with: |
| 56 | + name: Forks ${{ steps.tag.outputs.TAG_NAME }} |
| 57 | + draft: false |
| 58 | + prerelease: false |
| 59 | + files: | |
| 60 | + forks-macos.zip |
| 61 | + body: | |
| 62 | + ## Forks ${{ steps.tag.outputs.TAG_NAME }} |
| 63 | + |
| 64 | + ### Installation |
| 65 | + 1. Download `forks-macos.zip` |
| 66 | + 2. Extract the zip file |
| 67 | + 3. Move `forks.app` to your Applications folder |
| 68 | + 4. Right-click and select "Open" (required for first launch since the app is not notarized) |
| 69 | + |
| 70 | + ### Requirements |
| 71 | + - macOS 13.0 or later |
| 72 | + - Node.js (for `npx skills` command) |
| 73 | + env: |
| 74 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments