-
Notifications
You must be signed in to change notification settings - Fork 14
130 lines (107 loc) · 3.33 KB
/
mac.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: MacOS builds
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published
- prereleased
jobs:
build-mac64:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.2'
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "10.3"
- name: Initialize project
run: |
mkdir build
cd build
qmake ../DDCToolbox.pro "CONFIG += CI" "CONFIG += no_tests"
- name: Build
run: |
cd build
make
- name: Build .dmg
run: |
cd build/src
macdeployqt DDCToolbox.app -dmg
- run: ls -la build
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: DDCToolbox_mac64_dmg
path: build/src/DDCToolbox.dmg
publish-nightly:
runs-on: ubuntu-latest
needs: [build-mac64]
steps:
- name: Prepare version information (1/3)
uses: oprypin/find-latest-tag@v1
with:
repository: ThePBone/DDCToolbox
releases-only: true
id: last_release
- name: Prepare version information (2/3)
uses: benjlevesque/[email protected]
id: short-sha
with:
length: 6
- name: Prepare version information (3/3)
run: echo '::set-output name=version::${{steps.last_release.outputs.tag}}-${{steps.short-sha.outputs.sha}}'
id: version
- name: Download portable artifact
uses: actions/[email protected]
with:
name: DDCToolbox_mac64_dmg
- name: Rename portable artifact
run: mv DDCToolbox.dmg ddctoolbox_${{steps.version.outputs.version}}_mac64.dmg
- name: Upload binary to nightly server
uses: wlixcc/[email protected]
with:
username: 'tim'
server: 'local.timschneeberger.me'
port: 22
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
local_path: './ddctoolbox_${{steps.version.outputs.version}}_mac64.dmg'
remote_path: '/srv/http/nightly.timschneeberger.me/ddctoolbox-mac/'
args: '-o ConnectTimeout=5'
attach-to-release:
runs-on: ubuntu-latest
needs: [build-mac64]
if: github.event_name == 'release'
steps:
- name: Prepare version information (1/3)
uses: oprypin/find-latest-tag@v1
with:
repository: ThePBone/DDCToolbox
releases-only: true
id: last_release
- name: Prepare version information (2/3)
uses: benjlevesque/[email protected]
id: short-sha
with:
length: 6
- name: Prepare version information (3/3)
run: echo '::set-output name=version::${{steps.last_release.outputs.tag}}-${{steps.short-sha.outputs.sha}}'
id: version
- name: Download portable artifact
uses: actions/[email protected]
with:
name: DDCToolbox_mac64_dmg
- name: Rename portable artifact
run: mv DDCToolbox.dmg ddctoolbox_${{steps.version.outputs.version}}_mac64.dmg
- uses: AButler/[email protected]
with:
files: '*.dmg'
repo-token: ${{ secrets.GITHUB_TOKEN }}