-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (59 loc) · 1.53 KB
/
macos.yaml
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
name: macOS CI
on:
push:
workflow_dispatch:
pull_request:
release:
types: [published]
jobs:
build:
strategy:
matrix:
os: [macos-13]
arch: [x64, arm64]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: "Install Dependencies"
run: |
npm install -g appdmg
- name: "Install .NET"
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- uses: actions/checkout@v1
with:
submodules: 'recursive'
- name: "Build Project"
run: ./build-macos.sh
env:
BUILD_ARCH: ${{ matrix.arch }}
working-directory: dist
- name: "Create Disk Image"
run: appdmg dist/app-dmg-spec.json ./bnbnav-mac-${{ matrix.arch }}.dmg
- uses: actions/upload-artifact@v3
name: "Upload Artifact"
with:
name: "bnbnav-mac-${{ matrix.arch }}.dmg"
path: "./bnbnav-mac-${{ matrix.arch }}.dmg"
release:
strategy:
matrix:
arch: [ x64, arm64 ]
fail-fast: false
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
name: "Download Artifact"
id: download
with:
name: "bnbnav-mac-${{ matrix.arch }}.dmg"
- name: "Upload to Release"
uses: softprops/action-gh-release@v1
with:
files: bnbnav-mac-*.dmg