forked from mortbopet/Ripes
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (68 loc) · 2.16 KB
/
windows-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
name: Windows / Qt 6.5.0
on:
workflow_run:
workflows: ["Release setup"]
types: [completed]
jobs:
buildWindows:
runs-on: windows-latest
strategy:
matrix:
build-type: [Release, Debug]
steps:
- name: get container ready for build
uses: ilammy/msvc-dev-cmd@v1
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
aqtversion: '==3.1.*'
py7zrversion: '>=0.20.2'
version: '6.5.0'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
modules: 'qtcharts'
- name: checkout sources
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: build Ripes
shell: bash
run: |
cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
cmake --build .
- name: package artifacts
shell: bash
run: |
source .github/workflows/scripts/set_version.sh
APPNAME=Ripes-${RIPES_VERSION}-win-x86_64.zip
echo "APPNAME=${APPNAME}" >> $GITHUB_ENV
mkdir packageDir
pushd packageDir
mv ../Ripes.exe .
# Translate ie. "Release" -> "release"
windeployqt.exe -svg --$(echo "${{ matrix.build-type }}" | tr '[:upper:]' '[:lower:]') \
--no-compiler-runtime --no-opengl-sw --no-translations Ripes.exe
7z a -r ../${APPNAME} *
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.build-type }}_executable
path: ${{ env.APPNAME }}
- 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 }}
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 }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}