-
Notifications
You must be signed in to change notification settings - Fork 14
67 lines (65 loc) · 2.15 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
build:
name: Build
runs-on: macos-latest
env:
JOB_TYPE: BUILD
steps:
- uses: actions/checkout@v4
- name: Xcodebuild Debug
uses: sersoft-gmbh/xcodebuild-action@v3
with:
project: PinConfigurator.xcodeproj
scheme: PinConfigurator
destination: platform=macOS
configuration: Debug
arch: x86_64
action: build
- name: Xcodebuild Release
uses: sersoft-gmbh/xcodebuild-action@v3
with:
project: PinConfigurator.xcodeproj
scheme: PinConfigurator
destination: platform=macOS
configuration: Release
arch: x86_64
action: build
- name: Prepare release image
run: |
mkdir build/Release-App
mv build/Release/PinConfigurator.app build/Release-App/
- name: Prepare debug image
run: |
mkdir build/Debug-App
mv build/Debug/PinConfigurator.app build/Debug-App/
- name: Create DMG image
run: |
brew install create-dmg
export VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" build/Release-App/PinConfigurator.app/Contents/Info.plist)
echo $VERSION
create-dmg --no-internet-enable --sandbox-safe --window-size 450 450 build/PinConfigurator-${VERSION}-Debug.dmg build/Debug-App/
create-dmg --no-internet-enable --sandbox-safe --window-size 450 450 build/PinConfigurator-${VERSION}-Release.dmg build/Release-App/
- name: Upload app
uses: actions/upload-artifact@v4
with:
path: build/*.dmg
- name: Upload to Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/*/*.zip
- name: Upload to Release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/*.dmg
tag: ${{ github.ref }}
file_glob: true