Skip to content

Commit e95df50

Browse files
author
tanin
committed
CI for publishing windows
1 parent 0049f66 commit e95df50

6 files changed

Lines changed: 22 additions & 15 deletions

File tree

.github/workflows/create-release-mac.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
25-
with:
26-
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
2725
- name: Import Signing Certificate
2826
run: |
2927
# Create a temporary keychain

.github/workflows/create-release-windows.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: create-release-mac
1+
name: create-release-windows
22

33
on:
44
push:
@@ -18,12 +18,21 @@ permissions:
1818
jobs:
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+
mingw-w64-x86_64-nodejs
2334
- name: Checkout
2435
uses: actions/checkout@v4
25-
with:
26-
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
2736
- uses: actions/setup-java@v4
2837
with:
2938
distribution: temurin
@@ -38,18 +47,20 @@ jobs:
3847
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
3948
- name: Get version
4049
id: version
41-
run: echo "VERSION=$(./gradlew -q printInternalVersion)" >> "$GITHUB_OUTPUT"
50+
run: |
51+
version=$(./gradlew -q printInternalVersion)
52+
echo "VERSION=$version" >> $GITHUB_OUTPUT
4253
- name: Validate the tag name
4354
run: |
44-
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ ! -z "${{ github.event.inputs.tag }}" ]; then
55+
if [[ "${{ github.event_name }}" == "workflow_dispatch" && ! -z "${{ github.event.inputs.tag }}" ]]; then
4556
TAG=${{ github.event.inputs.tag }}
4657
else
4758
TAG=${GITHUB_REF#refs/tags/}
4859
fi
4960
if [[ ! "$TAG" =~ ^v ]]; then
5061
echo "Error: Tag ($TAG) must start with 'v'"
5162
exit 1
52-
fi
63+
fi
5364
if [[ ! $TAG == v${{ steps.version.outputs.VERSION }} ]]; then
5465
echo "Error: Git tag version ($TAG) doesn't match project version (v${{ steps.version.outputs.VERSION }})"
5566
exit 1
@@ -63,18 +74,18 @@ jobs:
6374
Invoke-WebRequest -Uri "https://www.ssl.com/download/codesigntool-for-windows/" -OutFile "./build-tools/CodeSignTool.zip"
6475
Expand-Archive -Path "./build-tools/CodeSignTool.zip" -DestinationPath "./build-tools/codesign" -Force
6576
Remove-Item "./build-tools/CodeSignTool.zip"
66-
shell: pwsh
77+
shell: powershell
6778
- name: Download wixtool 3 and extract
6879
run: |
6980
$ProgressPreference = 'SilentlyContinue'
7081
New-Item -ItemType Directory -Force -Path "./build-tools/wixtool"
7182
Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip" -OutFile "./build-tools/wix-binaries.zip"
7283
Expand-Archive -Path "./build-tools/wix-binaries.zip" -DestinationPath "./build-tools/wixtool" -Force
7384
Remove-Item "./build-tools/wix-binaries.zip"
74-
shell: pwsh
85+
shell: powershell
7586
- name: Build an MSI
7687
run: |
77-
export PATH="$PATH:$PWD/build-tools/wixtool"
88+
export PATH="${PATH}:$PWD/build-tools/wixtool"
7889
./gradlew clean jpackage
7990
env:
8091
CODESIGN_TOOL_DIR: "./build-tools/codesign"

.github/workflows/publish-mac-testflight.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ jobs:
1919
steps:
2020
- name: Checkout
2121
uses: actions/checkout@v4
22-
with:
23-
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
2422
- name: Import Signing Certificate
2523
run: |
2624
# Create a temporary keychain

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ tasks.jar {
201201
manifest.attributes["Main-Class"] = mainClassName
202202
}
203203

204-
val executableExt = if (currentOS == OS.WINDOWS) ".cmd" else ""
204+
val executableExt = if (currentOS == OS.WINDOWS) "" else ""
205205

206206
tasks.register<Exec>("compileTailwind") {
207207
environment("NODE_ENV", "production")

src/main/c/WindowsApi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ __declspec(dllexport) char* openFileDialog(long hwnd, bool isSaved) {
1717

1818
ZeroMemory(&ofn, sizeof(ofn));
1919
ofn.lStructSize = sizeof(ofn);
20-
ofn.hwndOwner = (HWND) (uintptr_t) hwnd;
20+
ofn.hwndOwner = (HWND) (size_t) hwnd;
2121
ofn.lpstrFile = szFile;
2222
ofn.lpstrFile[0] = '\0';
2323
ofn.nMaxFile = sizeof(szFile);
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)