forked from Alkl58/RcloneBrowser
-
Notifications
You must be signed in to change notification settings - Fork 1
150 lines (131 loc) · 4.48 KB
/
build.yml
File metadata and controls
150 lines (131 loc) · 4.48 KB
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
name: Build Rclone Browser
on:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
build_windows:
name: Windows Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Development Tools
run: |
choco install visualstudio2019community visualstudio2019-workload-nativedesktop cmake qt5-default -y
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
refreshenv
python get-pip.py
refreshenv
pip install py7zr lxml requests semantic-version
Remove-Item -Recurse -Force C:\Qt
mkdir C:\Qt
pushd C:\Qt
git clone https://github.com/engnr/qt-downloader.git
mv qt-downloader/qt-downloader .\qtd
Remove-Item -Recurse -Force qt-downloader
python qtd windows desktop 5.15.2 win64_msvc2019_64
popd
- name: Build Rclone Browser
run: |
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_PREFIX_PATH=C:\Qt\5.15.2\msvc2019_64 ..
cmake --build . --config Release
C:\Qt\5.15.2\msvc2019_64\bin\windeployqt.exe --no-translations --no-angle --no-compiler-runtime --no-svg ".\build\Release\RcloneBrowser.exe"
- uses: actions/upload-artifact@v3
with:
name: windows
path: build\build\Release\*
build_linux:
name: Linux Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Development Tools
run: |
sudo apt update
sudo apt -y install git g++ cmake make qtdeclarative5-dev qtmultimedia5-dev
- name: Build Rclone Browser
run: |
mkdir build
cd build
cmake ..
make -j $(nproc)
- uses: actions/upload-artifact@v3
with:
name: linux
path: build/build/*
build_macos:
name: macOS Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install Development Tools
run: brew install git cmake rclone qt5
- name: Build Rclone Browser
run: |
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH:PATH=/usr/local/opt/qt5
make -j $(nproc)
cd build
/usr/local/opt/qt@5/bin/macdeployqt rclone-browser.app -executable="rclone-browser.app/Contents/MacOS/rclone-browser" -qmldir=../src/
mv rclone-browser.app Rclone\ Browser.app
- uses: actions/upload-artifact@v3
with:
name: macos
path: build/build/*
build_freebsd:
name: FreeBSD Build
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Install Development Tools and Build Rclone Browser
uses: vmactions/freebsd-vm@v0
with:
mem: 4096
prepare: |
env ASSUME_ALWAYS_YES=YES pkg update -f
env ASSUME_ALWAYS_YES=YES pkg install -y git cmake qt5-buildtools qt5-declarative qt5-multimedia qt5-qmake
cd work/RcloneBrowser/RcloneBrowser
mkdir build
cd build
cmake ..
make
- uses: actions/upload-artifact@v3
with:
name: freebsd
path: build/build/*
create_release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build_windows, build_linux, build_macos, build_freebsd]
steps:
- uses: actions/checkout@v3
- name: Create artifact directory
run: rm -rf /tmp/artifacts && mkdir /tmp/artifacts
- uses: actions/download-artifact@v3
with:
path: /tmp/artifacts
- name: Compress artifacts
run: |
pushd /tmp/artifacts
for i in *;do zip -r -0 $i.zip $i;done
popd
- name: Get short commit
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- uses: rickstaa/action-create-tag@v1
with:
tag: release-${{ env.SHORT_SHA }}
tag_exists_error: false
- uses: ncipollo/release-action@v1
with:
artifacts: "/tmp/artifacts/*.zip"
name: Rclone Browser Autobuild For Commit ${{ env.SHORT_SHA }}
omitBody: true
generateReleaseNotes: true
prerelease: true
skipIfReleaseExists: true
tag: release-${{ env.SHORT_SHA }}