-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (98 loc) · 2.82 KB
/
release.yml
File metadata and controls
116 lines (98 loc) · 2.82 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
name: Release
on:
push:
tags: ['*.*.*']
workflow_dispatch:
inputs:
version:
description: 'Version (x.y.z)'
required: true
default: '0.0.0'
jobs:
build:
runs-on: windows-2025-vs2026
steps:
- uses: actions/checkout@v5
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.10.2'
cache: true
modules: ''
- name: Extract version
id: ver
shell: bash
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
else
echo "version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
fi
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v3
- name: Build
shell: pwsh
run: |
msbuild RLMMToolkit.slnx `
/p:Configuration=Release `
/p:Platform=x64 `
/p:AppVersion=${{ steps.ver.outputs.version }} `
/p:QtInstall=$env:QT_ROOT_DIR `
/m
- name: Deploy
shell: pwsh
run: |
mkdir dist
Copy-Item x64/Release/RLMMToolkit.exe dist/
Copy-Item x64/Release/RLMMUpdater.exe dist/
windeployqt dist/RLMMToolkit.exe --release --no-translations
- name: Zip
shell: pwsh
run: Compress-Archive dist/* RLMMToolkit-${{ inputs.version || github.ref_name }}.zip
- uses: actions/upload-artifact@v6
with:
name: dist
path: dist
if-no-files-found: error
- uses: actions/upload-artifact@v6
with:
name: exe
path: RLMMToolkit-*.zip
if-no-files-found: error
installer:
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v7
with:
name: dist
path: dist
- name: Install NSIS
shell: pwsh
run: choco install nsis -y --no-progress
- name: Build installer
shell: pwsh
run: |
& 'C:\Program Files (x86)\NSIS\makensis.exe' /DVERSION=${{ inputs.version || github.ref_name }} /DSRCDIR=dist installer.nsi
- uses: actions/upload-artifact@v6
with:
name: installer
path: RLMMToolkit-*-setup.exe
if-no-files-found: error
release:
needs: [build, installer]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v7
with:
path: artifacts
pattern: '{exe,installer}'
merge-multiple: true
- uses: softprops/action-gh-release@v3
with:
tag_name: ${{ inputs.version || github.ref_name }}
files: artifacts/*
generate_release_notes: true