-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (116 loc) · 4.94 KB
/
build.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build distributions
on:
push:
branches: [ 'release/**' ]
jobs:
Build_distribution:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, windows-2019, macos-12 ]
runs-on: ${{ matrix.os }}
steps:
- name: Add mask
run: |
echo "::add-mask::${{secrets.FBS_URL}}"
echo "::add-mask::${{secrets.FBS_PROXY_URL}}"
echo "::add-mask::${{secrets.FBS_URL_SHORTER}}"
echo "::add-mask::${{secrets.MACOS_CERTIFICATE}}"
echo "::add-mask::${{secrets.MACOS_CERTIFICATE_PWD}}"
echo "::add-mask::${{secrets.KEYCHAIN_PWD}}"
echo "::add-mask::${{secrets.NOTARIZATION_USERNAME}}"
echo "::add-mask::${{secrets.NOTARIZATION_PASSWORD}}"
- uses: actions/checkout@v2
- if: matrix.os == 'windows-2019'
name: Set up Python for Windows
uses: actions/setup-python@v2
with:
python-version: 3.10.11
- if: matrix.os != 'windows-2019'
name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.15
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5.1
- if: matrix.os == 'ubuntu-20.04'
name: Install libEgl libraries for Linux
run: |
sudo apt update
sudo apt install -y libpulse-mainloop-glib0 libegl1-mesa-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev
- name: Install fpm
uses: fortran-lang/setup-fpm@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install gdown
gdown ${{secrets.FBS_PROXY_URL}} -q -O fbs.tar.gz
pip install fbs.tar.gz
pip install -e .
pip install git+https://github.com/plotlyst/qt-uic.git
pip install git+https://github.com/plotlyst/qt-anim.git
pip install git+https://github.com/plotlyst/qt-menu.git
pip install git+https://github.com/plotlyst/qt-tour.git
pip install git+https://github.com/plotlyst/qt-textedit.git
pip install git+https://github.com/plotlyst/qt-handy.git
pip install git+https://github.com/plotlyst/qt-emojipicker.git
pip install git+https://github.com/plotlyst/qt-frames.git
pip install git+https://github.com/plotlyst/qt-toolbox-widget.git
pip install git+https://github.com/plotlyst/language_tool_python.git@plotlyst
pip install git+https://github.com/plotlyst/pypandoc.git@plotlyst
- name: Generate code
run: |
qt-uic --source ui --target src/main/python/plotlyst/view/generated
- name: fbs
run: |
fbs freeze
- if: matrix.os == 'macos-12'
name: Sign Macos App
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p ${{secrets.KEYCHAIN_PWD}} build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p ${{secrets.KEYCHAIN_PWD}} build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${{secrets.KEYCHAIN_PWD}} build.keychain
/usr/bin/codesign -v --timestamp --options=runtime --entitlements entitlements.plist --deep --force -s ${{secrets.MACOS_CERTIFICATE_IDENTITY}} target/Plotlyst.app
- if: matrix.os == 'macos-12'
name: "Notarize Macos App"
uses: lando/[email protected]
with:
product-path: "target/Plotlyst.app"
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }}
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }}
appstore-connect-team-id: W527JJ9SK4
verbose: true
- if: matrix.os == 'macos-12'
name: "Staple Macos App"
uses: BoundfoxStudios/action-xcode-staple@v1
with:
product-path: "target/Plotlyst.app"
- name: Build installer
run: |
fbs installer
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-20.04'
with:
name: app-deb-artifact
path: target/Plotlyst.deb
- uses: actions/upload-artifact@v4
if: matrix.os == 'macos-12'
with:
name: app-mac-artifact
path: target/Plotlyst.dmg
- uses: actions/upload-artifact@v4
if: matrix.os == 'windows-2019'
with:
name: app-win-artifact
path: target\PlotlystSetup.exe