1- name : create-release-mac
1+ name : create-release-windows
22
33on :
44 push :
@@ -18,63 +18,84 @@ 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'
37+ - name : Debug node
38+ run : |
39+ export PATH="${PATH}:/c/hostedtoolcache/windows/node/22.21.1/x64"
40+ node --version
41+ npm --version
2342 - name : Checkout
2443 uses : actions/checkout@v4
25- with :
26- ref : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
44+ - name : Install Node modules
45+ run : |
46+ export PATH="${PATH}:/c/hostedtoolcache/windows/node/22.21.1/x64"
47+ npm install
48+ - name : Install WSL (needed by CodeSignTool)
49+ run : |
50+ wsl --install
2751 - uses : actions/setup-java@v4
2852 with :
2953 distribution : temurin
3054 java-version : ' 21'
3155 cache : ' gradle'
32- - uses : actions/setup-node@v4
33- with :
34- node-version : ' 22'
3556 - name : Setup Gradle
3657 uses : gradle/actions/setup-gradle@v3
3758 with :
3859 cache-read-only : ${{ github.ref != 'refs/heads/main' }}
3960 - name : Get version
4061 id : version
41- run : echo "VERSION=$(./gradlew -q printInternalVersion)" >> "$GITHUB_OUTPUT"
62+ run : |
63+ version=$(./gradlew -q printInternalVersion)
64+ echo "VERSION=$version" >> $GITHUB_OUTPUT
4265 - name : Validate the tag name
4366 run : |
44- if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ ! -z "${{ github.event.inputs.tag }}" ]; then
67+ if [[ "${{ github.event_name }}" == "workflow_dispatch" && ! -z "${{ github.event.inputs.tag }}" ] ]; then
4568 TAG=${{ github.event.inputs.tag }}
4669 else
4770 TAG=${GITHUB_REF#refs/tags/}
4871 fi
4972 if [[ ! "$TAG" =~ ^v ]]; then
5073 echo "Error: Tag ($TAG) must start with 'v'"
5174 exit 1
52- fi
75+ fi
5376 if [[ ! $TAG == v${{ steps.version.outputs.VERSION }} ]]; then
5477 echo "Error: Git tag version ($TAG) doesn't match project version (v${{ steps.version.outputs.VERSION }})"
5578 exit 1
5679 fi
57- - name : Install Node modules
58- run : npm install
5980 - name : Download CodeSignTool and extract
6081 run : |
6182 $ProgressPreference = 'SilentlyContinue'
6283 New-Item -ItemType Directory -Force -Path "./build-tools/codesign"
6384 Invoke-WebRequest -Uri "https://www.ssl.com/download/codesigntool-for-windows/" -OutFile "./build-tools/CodeSignTool.zip"
6485 Expand-Archive -Path "./build-tools/CodeSignTool.zip" -DestinationPath "./build-tools/codesign" -Force
6586 Remove-Item "./build-tools/CodeSignTool.zip"
66- shell : pwsh
87+ shell : powershell
6788 - name : Download wixtool 3 and extract
6889 run : |
6990 $ProgressPreference = 'SilentlyContinue'
7091 New-Item -ItemType Directory -Force -Path "./build-tools/wixtool"
7192 Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip" -OutFile "./build-tools/wix-binaries.zip"
7293 Expand-Archive -Path "./build-tools/wix-binaries.zip" -DestinationPath "./build-tools/wixtool" -Force
7394 Remove-Item "./build-tools/wix-binaries.zip"
74- shell : pwsh
95+ shell : powershell
7596 - name : Build an MSI
7697 run : |
77- export PATH="$PATH:$PWD/build-tools/wixtool"
98+ export PATH="${ PATH} :$PWD/build-tools/wixtool:/c/hostedtoolcache/windows/node/22.21.1/x64 "
7899 ./gradlew clean jpackage
79100 env :
80101 CODESIGN_TOOL_DIR : " ./build-tools/codesign"
0 commit comments