Skip to content

Commit bc7f23f

Browse files
committed
fix: Windows .exe binary download, update CI workflows
- Add .exe extension for Windows devglobe-core download and path resolution - Update root CI workflows (verifyPlugin step, --info flag, version extraction fix)
1 parent 7c521d8 commit bc7f23f

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/publish-jetbrains.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
publish:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113
defaults:
1214
run:
1315
working-directory: jetbrains-plugin
@@ -22,6 +24,20 @@ jobs:
2224

2325
- run: ./gradlew buildPlugin
2426

25-
- run: ./gradlew publishPlugin
27+
- run: ./gradlew verifyPlugin
28+
29+
- run: ./gradlew publishPlugin --info
2630
env:
2731
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
32+
33+
- name: Create GitHub Release
34+
uses: softprops/action-gh-release@v2
35+
with:
36+
files: jetbrains-plugin/build/distributions/*.zip
37+
body: |
38+
## JetBrains Plugin
39+
40+
### Install manually
41+
1. Download the `.zip` file below
42+
2. Go to **Settings → Plugins → ⚙️ → Install Plugin from Disk**
43+
3. Select the downloaded file

.github/workflows/release-jetbrains.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Extract version
2929
id: version
30-
run: echo "version=$(grep '^version=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT
30+
run: echo "version=$(grep 'version = ' build.gradle.kts | head -1 | sed 's/.*\"\(.*\)\".*/\1/')" >> $GITHUB_OUTPUT
3131

3232
- name: Create GitHub Release
3333
uses: softprops/action-gh-release@v2

jetbrains-plugin/src/main/kotlin/xyz/devglobe/plugin/core/CoreDownloader.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ object CoreDownloader {
2020

2121
fun getBinaryPath(): String {
2222
val dir = File(System.getProperty("user.home"), ".devglobe/bin")
23-
val name = "devglobe-core-$CORE_VERSION"
23+
val ext = if (System.getProperty("os.name").lowercase().contains("win")) ".exe" else ""
24+
val name = "devglobe-core-$CORE_VERSION$ext"
2425
return File(dir, name).absolutePath
2526
}
2627

@@ -32,7 +33,8 @@ object CoreDownloader {
3233
return false
3334
}
3435

35-
val url = "$BASE_URL/devglobe-core-$platform"
36+
val ext = if (platform.startsWith("win")) ".exe" else ""
37+
val url = "$BASE_URL/devglobe-core-$platform$ext"
3638
val target = File(getBinaryPath())
3739
target.parentFile.mkdirs()
3840

0 commit comments

Comments
 (0)