-
Notifications
You must be signed in to change notification settings - Fork 0
202 lines (169 loc) · 6.11 KB
/
cd.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
name: CD
on:
- push
- pull_request
jobs:
build-win:
name: win build (msys2)
if: github.event_name == 'push'
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-cmake make mingw-w64-x86_64-ninja mingw-w64-x86_64-toolchain mingw-w64-x86_64-qt6-base mingw-w64-x86_64-qt6-svg mingw-w64-x86_64-qt6-tools mingw-w64-x86_64-nsis zip unzip
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Configure
run: |
mkdir build
cd build
cmake ..
- name: Release translation
run: |
cd build
cmake --build . --target qweave_lrelease
- name: Build
run: |
cd build
cmake --build .
- name: Package
id: package
run: |
cd build
VERSION_NAME=`git describe`
../.github/scripts/package_msys.sh
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload zip to GitHub Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: qweave-win-qt6-zip
path: ./build/package-zip/qweave-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.zip
- name: Upload to GitHub Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: qweave-win-qt6-exe
path: ./build/qweave-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.exe
- name: Release exe
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: |
./build/qweave-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.exe
./build/package-zip/qweave-win-qt6-${{ steps.package.outputs.VERSION_NAME }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
###################################
build-linux-release:
name: linux appimage
if: github.event_name == 'push'
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Updates
run: sudo apt-get update
- name: Dependencies
run: sudo apt-get install qtbase5-dev qt5-default cmake libqt5svg5-dev qttools5-dev
- name: Configure
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=appdir/usr ..
- name: Build
run: |
cd build
cmake --build . --target install
- name: Package
id: package
run: |
cd build
VERSION_NAME=`git describe`
. ../.github/scripts/package_linux.sh
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload to Github Artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: QWeave-linux
path: QWeave-linux-${{ steps.package.outputs.VERSION_NAME }}-x86_64.AppImage
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: QWeave-linux-${{ steps.package.outputs.VERSION_NAME }}-x86_64.AppImage
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
############################
macosx:
name: Mac OS X
runs-on: macos-latest
if: true
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch tag annotations
run: git fetch --tags --force
- name: Install Dependencies
run: |
wget https://github.com/sunderme/homebrew-qt6/releases/download/6.4.0-1/QtBase-6.4.0-Darwin.tar.xz
sudo tar xvf ./QtBase-6.4.0-Darwin.tar.xz -C /usr/local
rm QtBase-6.4.0-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/6.4.0-1/QtSvg-6.4.0-Darwin.tar.xz
sudo tar xvf ./QtSvg-6.4.0-Darwin.tar.xz -C /usr/local/QtBase-6.4.0-Darwin --strip-components=1
rm QtSvg-6.4.0-Darwin.tar.xz
wget https://github.com/sunderme/homebrew-qt6-modules/releases/download/6.4.0-1/QtTools-6.4.0-Darwin.tar.xz
sudo tar xvf ./QtTools-6.4.0-Darwin.tar.xz -C /usr/local/QtBase-6.4.0-Darwin --strip-components=1
rm QtTools-6.4.0-Darwin.tar.xz
- name: Configure
run: |
mkdir build
cd build
/usr/local/QtBase-6.4.0-Darwin/bin/qt-cmake ..
- name: Release translation
run: cmake --build build --target qweave_lrelease
- name: Build
run: cmake --build build
- name: Workarounds
run: |
mkdir -p texstudio.app/Contents/Frameworks
cp /usr/local/lib/libbrotlicommon.1.dylib texstudio.app/Contents/Frameworks
- name: Package
id: package
run: |
cd build
/usr/local/QtBase-6.4.0-Darwin/bin/macdeployqt qweave.app -dmg
VERSION_NAME=`git describe`
cp qweave.dmg qweave-osx-${VERSION_NAME}.dmg
echo "VERSION_NAME=${VERSION_NAME}">> $GITHUB_OUTPUT
- name: Upload to Github artifacts
if: github.event_name == 'push'
uses: actions/upload-artifact@v3
with:
name: qweave-osx
path: build/qweave-osx-${{ steps.package.outputs.VERSION_NAME }}.dmg
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
files: build/qweave-osx-${{ steps.package.outputs.VERSION_NAME }}.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}