-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (76 loc) · 3.05 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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