-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (42 loc) · 1.46 KB
/
build-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
name: Build and Release Windows
on:
push:
tags:
- '*'
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '17'
- name: Build Compose Desktop
run: |
./gradlew packageMsi
- name: install lessmsi And innosetup
run: |
choco install lessmsi --no-progress
choco install innosetup --no-progress
- name: msi to dir
run: |
mkdir build\windows
lessmsi x build\compose\binaries\main\msi\SourceCodeDocxGeneratorCompose-1.0.0.msi build\windows\
- name: Package as exe
run: iscc innosetup/setup.iss
- name: Rename files
run: |
Get-ChildItem -Path "build\compose\binaries\main\msi\" -Filter "*.msi" | Rename-Item -NewName { $_.Name -replace '\.msi$', '-windows.msi' }
Get-ChildItem -Path "innosetup\output\release\" -Filter "*.exe" | Rename-Item -NewName { $_.Name -replace '\.exe$', '-windows.exe' }
- name: Upload to Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
build/compose/binaries/main/msi/*-windows.msi
innosetup/output/release/*-windows.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}