1- name : create-release-mac
1+ name : create-release-windows
22
33on :
44 push :
@@ -18,63 +18,78 @@ permissions:
1818jobs :
1919 build :
2020 runs-on : windows-latest
21+ defaults :
22+ run :
23+ shell : msys2 {0}
2124
2225 steps :
26+ - uses : msys2/setup-msys2@v2
27+ with :
28+ update : true
29+ install : >-
30+ curl
31+ git
32+ gcc
33+ unzip
34+ - uses : actions/setup-node@v4
35+ with :
36+ node-version : ' 22'
2337 - name : Checkout
2438 uses : actions/checkout@v4
25- with :
26- ref : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
39+ - name : Install Node modules
40+ run : |
41+ export PATH="${PATH}:/c/hostedtoolcache/windows/node/22.21.1/x64"
42+ npm install
2743 - uses : actions/setup-java@v4
2844 with :
2945 distribution : temurin
3046 java-version : ' 21'
3147 cache : ' gradle'
32- - uses : actions/setup-node@v4
33- with :
34- node-version : ' 22'
3548 - name : Setup Gradle
3649 uses : gradle/actions/setup-gradle@v3
3750 with :
3851 cache-read-only : ${{ github.ref != 'refs/heads/main' }}
3952 - name : Get version
4053 id : version
41- run : echo "VERSION=$(./gradlew -q printInternalVersion)" >> "$GITHUB_OUTPUT"
54+ run : |
55+ version=$(./gradlew -q printInternalVersion)
56+ echo "VERSION=$version" >> $GITHUB_OUTPUT
4257 - name : Validate the tag name
4358 run : |
44- if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ ! -z "${{ github.event.inputs.tag }}" ]; then
59+ if [[ "${{ github.event_name }}" == "workflow_dispatch" && ! -z "${{ github.event.inputs.tag }}" ] ]; then
4560 TAG=${{ github.event.inputs.tag }}
4661 else
4762 TAG=${GITHUB_REF#refs/tags/}
4863 fi
4964 if [[ ! "$TAG" =~ ^v ]]; then
5065 echo "Error: Tag ($TAG) must start with 'v'"
5166 exit 1
52- fi
67+ fi
5368 if [[ ! $TAG == v${{ steps.version.outputs.VERSION }} ]]; then
5469 echo "Error: Git tag version ($TAG) doesn't match project version (v${{ steps.version.outputs.VERSION }})"
5570 exit 1
5671 fi
57- - name : Install Node modules
58- run : npm install
5972 - name : Download CodeSignTool and extract
6073 run : |
6174 $ProgressPreference = 'SilentlyContinue'
6275 New-Item -ItemType Directory -Force -Path "./build-tools/codesign"
6376 Invoke-WebRequest -Uri "https://www.ssl.com/download/codesigntool-for-windows/" -OutFile "./build-tools/CodeSignTool.zip"
6477 Expand-Archive -Path "./build-tools/CodeSignTool.zip" -DestinationPath "./build-tools/codesign" -Force
6578 Remove-Item "./build-tools/CodeSignTool.zip"
66- shell : pwsh
79+ Get-ChildItem -Path "./build-tools/codesign" -Recurse | Select-Object FullName
80+ shell : powershell
6781 - name : Download wixtool 3 and extract
6882 run : |
6983 $ProgressPreference = 'SilentlyContinue'
7084 New-Item -ItemType Directory -Force -Path "./build-tools/wixtool"
7185 Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip" -OutFile "./build-tools/wix-binaries.zip"
7286 Expand-Archive -Path "./build-tools/wix-binaries.zip" -DestinationPath "./build-tools/wixtool" -Force
7387 Remove-Item "./build-tools/wix-binaries.zip"
74- shell : pwsh
88+ Get-ChildItem -Path "./build-tools/wixtool" -Recurse | Select-Object FullName
89+ shell : powershell
7590 - name : Build an MSI
7691 run : |
77- export PATH="$PATH:$PWD/build-tools/wixtool"
92+ export PATH="${ PATH} :$PWD/build-tools/wixtool:/c/hostedtoolcache/windows/node/22.21.1/x64 "
7893 ./gradlew clean jpackage
7994 env :
8095 CODESIGN_TOOL_DIR : " ./build-tools/codesign"
0 commit comments