-
Notifications
You must be signed in to change notification settings - Fork 27
101 lines (86 loc) · 3.26 KB
/
build_starc_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
name: Build Starc for Mac
env:
APP_VERSION: 0.7.6
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
tags:
- v*
workflow_dispatch: {}
jobs:
build_mac:
name: Build Mac OS X version
runs-on: macos-latest
timeout-minutes: 120
steps:
- name: Checkout Sources for push or create tag event
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@master
with:
token: ${{ secrets.ACTION_RUNNER }}
submodules: recursive
fetch-depth: 0
- name: Checkout sources for pull request event
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@master
- name: Checkout submodules for pull request event
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
git submodule update --init --recursive src/3rd_party/qbreakpad/ src/3rd_party/pdfhummus/ src/3rd_party/pdftextextraction/
- name: Add info about dev build to the env
shell: bash
run: |
echo "DEV_BUILD=$(git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count)" >> $GITHUB_ENV
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 5.15.2
target: desktop
- name: Run QMake
shell: bash
run: |
cd src
qmake starc.pro DEFINES+="DEV_BUILD=$DEV_BUILD"
- name: Build
shell: bash
run: |
cd src
make -j2
- name: Make dmg image
shell: bash
run: |
cd build/mac
./create_dmg.sh ${{env.APP_VERSION}}
env:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_APP_PASSWORD: ${{ secrets.APPLE_ID_APP_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Collect artifacts
uses: actions/upload-artifact@v3
with:
name: mac packages
path: build/mac/starc-setup.dmg
- name: Publish artifacts to the dev stream and notify clients
if: startsWith(github.ref, 'refs/tags/') != true
shell: bash
run: |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "name_for_file=starc-setup.dmg" -F "file_bin=@build/mac/starc-setup.dmg" https://starc.app/api/app/updates/publish
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=mac" -F "version=${{env.APP_VERSION}} dev ${{env.DEV_BUILD}}" https://starc.app/api/app/updates/notify
- name: Publish artifacts to the GitHub releases
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/mac/starc-setup.dmg
- name: Notify clients that stable release published
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
curl -F "api_key=${{ secrets.STARC_API_KEY }}" -F "system=mac" -F "version=${{env.APP_VERSION}}" https://starc.app/api/app/updates/notify