-
-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (44 loc) · 1.36 KB
/
build.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
name: Build
on:
push:
branches:
- '**'
paths-ignore:
- 'LICENSE'
- '**.md'
pull_request:
release:
types: [created]
workflow_dispatch:
permissions:
write-all
jobs:
build-mac:
name: Build for macOS (Universal)
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build for macOS (Universal)
shell: bash
run: |
xcodebuild -project 'ProcessReporter.xcodeproj' -scheme 'ProcessReporter' -configuration 'Release' -destination 'platform=macOS' build -derivedDataPath 'build'
- name: Create DMG
shell: bash
run: |
hdiutil create -volname "ProcessReporter" -srcfolder "build/Build/Products/Release/ProcessReporter.app" -ov -format UDZO "ProcessReporter.dmg"
- name: Upload DMG Artifact
uses: actions/upload-artifact@v3
with:
name: ProcessReporter.dmg
path: ProcessReporter.dmg
- name: Upload DMG to GitHub Release
if: github.event_name == 'release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ProcessReporter.dmg
asset_name: ProcessReporter.dmg
asset_content_type: application/x-apple-diskimage