-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.07 KB
/
test.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
name: Build macOS App and DMG
on:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
macos-buildco:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-13, macos-14 ]
steps:
- name: Determine architecture
id: architecture
run: echo "::set-output name=arch::$(uname -m)"
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- run: go build -o ipingtray
- run: go install github.com/machinebox/appify@latest
- name: Create macOS app
run: appify -name "IPingTray" -icon docs/icon.png ipingtray
- name: Prepare DMG
run: mkdir dmg && mv IPingTray.app dmg/ && ln -s /Applications dmg/Applications
- name: Install create-dmg
run: brew install create-dmg
- name: Create DMG
run: create-dmg IPingTray.dmg dmg
- name: Upload DMG artifact
uses: actions/upload-artifact@v2
with:
name: ipingtray-${{ steps.architecture.outputs.arch }}.dmg
path: IPingTray.dmg