Update main.yml #41
Workflow file for this run
This file contains 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 and Deploy macOS App | |
on: | |
push: | |
branches: | |
- fixes | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build the project | |
run: xcodebuild -project AndroidTools/AndroidTools.xcodeproj -scheme AndroidTools -sdk macosx CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | |
- name: Archive the project | |
run: xcodebuild -project AndroidTools/AndroidTools.xcodeproj -scheme AndroidTools -sdk macosx -configuration Release archive -archivePath ${{github.workspace}}/build/AndroidTools.xcarchive CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | |
- name: Export the archive | |
run: | | |
xcodebuild -exportArchive \ | |
-archivePath ${{github.workspace}}/build/AndroidTools.xcarchive \ | |
-exportPath ${{github.workspace}}/build \ | |
-exportOptionsPlist AndroidTools/ExportOptions.plist \ | |
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | |
- name: List files | |
run: ls -l ${{github.workspace}}/build/ | |
- name: Create DMG | |
run: | | |
create-dmg \ | |
--volname "Android Tools Installer" \ | |
--window-pos 200 120 \ | |
--window-size 800 400 \ | |
--icon-size 100 \ | |
--icon "AndroidTools.app" 200 190 \ | |
--hide-extension "AndroidTools.app" \ | |
--app-drop-link 600 185 \ | |
--codesign "9BB8349BCD53A3C9E2D6971F68C639E8698D14D2" \ | |
--notarize "AndroidToolsProfile" \ | |
"${{github.workspace}}/build/AndroidTools.dmg" \ | |
"${{github.workspace}}/build/AndroidTools.app" | |
- name: Generate Appcast | |
run: | | |
/Users/thomasbernard/Library/Developer/Xcode/DerivedData/AndroidTools-gpsvovfznsypgdgwzvjqsbxcsjkq/SourcePackages/artifacts/sparkle/Sparkle/bin/generate_appcast \ | |
${{github.workspace}}/build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: AndroidTools | |
path: | | |
${{github.workspace}}/build/*.dmg | |
${{github.workspace}}/build/*.app | |
- name: Create GitHub Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.run_number }} | |
release_name: Release ${{ github.run_number }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{github.workspace}}/build/AndroidTools.dmg | |
asset_name: AndroidTools.dmg | |
asset_content_type: application/octet-stream | |
- name: Update Appcast URL | |
run: | | |
# Your script or command to update the appcast with the new DMG URL | |
echo "Updating appcast URL" | |
- name: Commit and Push Appcast | |
run: | | |
git add path/to/your/appcast.xml | |
git commit -m "Update appcast for version ${{ github.run_number }}" | |
git push origin fixes |