1- name : create-release-mac
1+ name : create-release-windows
22
33on :
44 push :
@@ -18,66 +18,79 @@ 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+ shell : powershell
6780 - name : Download wixtool 3 and extract
6881 run : |
6982 $ProgressPreference = 'SilentlyContinue'
7083 New-Item -ItemType Directory -Force -Path "./build-tools/wixtool"
7184 Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip" -OutFile "./build-tools/wix-binaries.zip"
7285 Expand-Archive -Path "./build-tools/wix-binaries.zip" -DestinationPath "./build-tools/wixtool" -Force
7386 Remove-Item "./build-tools/wix-binaries.zip"
74- shell : pwsh
87+ shell : powershell
7588 - name : Build an MSI
7689 run : |
77- export PATH="$PATH:$PWD/build-tools/wixtool"
90+ export PATH="${PATH}:$PWD/build-tools/wixtool:/c/hostedtoolcache/windows/node/22.21.1/x64"
91+ export CODESIGN_TOOL_DIR="$PWD/build-tools/codesign"
7892 ./gradlew clean jpackage
7993 env :
80- CODESIGN_TOOL_DIR : " ./build-tools/codesign"
8194 SSL_COM_USERNAME : ${{ secrets.SSL_COM_USERNAME }}
8295 SSL_COM_PASSWORD : ${{ secrets.SSL_COM_PASSWORD }}
8396 SSL_COM_TOTP_SECRET : ${{ secrets.SSL_COM_TOTP_SECRET }}
0 commit comments