|
1 |
| -# This is a basic workflow to help you get started with Actions |
2 |
| - |
3 |
| -name: Build Canary |
| 1 | +name: Build Nightly |
4 | 2 |
|
5 | 3 | # Controls when the workflow will run
|
6 | 4 | on:
|
| 5 | + pull_request: # Run for pull requests as well |
7 | 6 | # Triggers the workflow on push or pull request events but only for the main branch
|
8 | 7 | push:
|
9 | 8 | branches: [ main ]
|
|
14 | 13 | jobs:
|
15 | 14 | build_nightly_release:
|
16 | 15 | runs-on: macos-12
|
| 16 | + timeout-minutes: 30 # If a build exceeds 30 mins, it probably isn't ever going to complete |
17 | 17 |
|
18 | 18 | steps:
|
19 |
| - - name: "Checkout Project" |
20 |
| - uses: actions/checkout@v3 |
| 19 | + - uses: actions/checkout@v3 |
21 | 20 |
|
22 |
| - - name: "Select Xcode 13.3.1" |
23 |
| - uses: devbotsxyz/xcode-select@main |
| 21 | + - name: "Select Xcode 14.0" |
| 22 | + run: sudo xcode-select -s /Applications/Xcode_14.0.app |
| 23 | + |
| 24 | + ### Caching |
| 25 | + - uses: actions/cache@v2 |
| 26 | + name: "Cache Derived Data" |
24 | 27 | with:
|
25 |
| - version: "13.4.1" |
| 28 | + path: | |
| 29 | + ~/Library/Developer/Xcode/DerivedData/Swiftcord-*/Build |
| 30 | + ~/Library/Developer/Xcode/DerivedData/Swiftcord-*/SourcePackages |
| 31 | + key: ${{ runner.os }}-derivedData-cache-${{ hashFiles( |
| 32 | + 'Swiftcord.xcworkspace/xcshareddata/swiftpm/Package.resolved', |
| 33 | + 'Swiftcord.xcodeproj/xcshareddata/swiftpm/Package.resolved' |
| 34 | + ) }} # The xcworkspace will be removed soon |
| 35 | + restore-keys: | |
| 36 | + ${{ runner.os }}-derivedData-cache |
| 37 | + - name: Avoid inode changes for DerivedData |
| 38 | + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES |
26 | 39 |
|
| 40 | + ### Certs |
27 | 41 | - name: "Import Certificate: Development"
|
28 | 42 | env:
|
29 | 43 | BUILD_CERTIFICATE_BASE64: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA }}
|
@@ -68,22 +82,19 @@ jobs:
|
68 | 82 | TEAMID=`awk -F '=' '/DEVELOPMENT_TEAM/ {print $2; exit}' Swiftcord.xcodeproj/project.pbxproj`
|
69 | 83 | sed -i '' "s/$TEAMID/ RJNC97Y8QD;/g" Swiftcord.xcodeproj/project.pbxproj
|
70 | 84 |
|
71 |
| - - name: "Archive" |
| 85 | + - name: "Create Release Build Archive" |
72 | 86 | run: |
|
73 |
| - xcodebuild -workspace Swiftcord.xcworkspace -scheme Swiftcord -configuration Release archive -archivePath Swiftcord.xcarchive \ |
| 87 | + xcodebuild -project Swiftcord.xcodeproj -scheme Swiftcord -configuration Release archive -archivePath Swiftcord.xcarchive \ |
74 | 88 | COMPILER_INDEX_STORE_ENABLE=NO APPCENTER_APP_SECRET="${{ secrets.APPCENTER_APP_SECRET }}" "OTHER_CODE_SIGN_FLAGS=--keychain $RUNNER_TEMP/app-signing.keychain-db" | xcpretty
|
75 | 89 |
|
76 | 90 | - name: "Export & Sign Release Build"
|
77 | 91 | uses: devbotsxyz/xcode-export-archive@main
|
78 | 92 | with:
|
79 | 93 | workspace: Swiftcord.xcworkspace
|
80 | 94 | scheme: Swiftcord
|
81 |
| - |
82 |
| - - name: Install create-dmg |
83 |
| - run: npm install --global create-dmg |
84 | 95 |
|
85 |
| - - name: Make Release Dmg |
86 |
| - run: create-dmg Export/Swiftcord.app |
| 96 | + - name: Create Release DMG |
| 97 | + run: npm install --global create-dmg && create-dmg Export/Swiftcord.app |
87 | 98 |
|
88 | 99 | - name: "Notarize Release Build"
|
89 | 100 | run: |
|
|
0 commit comments