-
-
Notifications
You must be signed in to change notification settings - Fork 276
84 lines (73 loc) · 2.63 KB
/
mac-release.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
name: Mac / Qt 6.5.0
on:
workflow_run:
workflows: ["Release setup"]
types: [completed]
jobs:
buildMac:
runs-on: macos-latest
strategy:
matrix:
build-type: [Release, Debug]
steps:
- name: checkout sources
uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0
- name: setup Homebrew
run: brew install autoconf automake libtool xz pkg-config libgit2 libjpg libpng libmtp svg2png
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
py7zrversion: '>=0.20.2'
version: '6.5.0'
host: 'mac'
target: 'desktop'
arch: 'clang_64'
modules: 'qtcharts'
- name: build Ripes
run: |
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
export PATH=$QT_ROOT/bin:$PATH
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
DIR=$(pwd)
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" .
make
- name: package artifacts
run: |
macdeployqt $(if [ ${{ matrix.build-type }} -eq Debug ]; then echo "-use-debug-libs"; fi) Ripes.app
# Enable HiDPI scaling for Retina systems
plutil -replace NSHighResolutionCapable -bool true Ripes.app/Contents/Info.plist
# Create icon bundle
sh .github/workflows/scripts/svg2icns.sh resources/icons/logo.svg
mv logo.icns Ripes.app/Contents/Resources
plutil -replace CFBundleIconFile -string logo.icns Ripes.app/Contents/Info.plist
source .github/workflows/scripts/set_version.sh
export APPNAME=Ripes-${RIPES_VERSION}-mac-universal2
echo "APPNAME=${APPNAME}" >> $GITHUB_ENV
chmod +x Ripes.app/Contents/MacOS/Ripes
sudo mv Ripes.app ${APPNAME}.app
sudo zip -r ${APPNAME}.zip ${APPNAME}.app/
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.build-type }}_executable
path: ${{ env.APPNAME }}.zip
- name: continuous release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master' && matrix.build-type == 'Release'
with:
prerelease: true
files: ${{ env.APPNAME }}.zip
tag_name: continuous
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: (startsWith(github.ref, 'refs/tags/')) && (matrix.build-type == 'Release')
name: tagged release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.APPNAME }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}