Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/build-plugin.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Build PyCharm Plugin

on:
release:
types: [created, published]
workflow_dispatch:
inputs:
version:
description: 'Version tag (e.g., 0.2.1)'
required: true
type: string

jobs:
build:
Expand Down Expand Up @@ -48,23 +51,20 @@ jobs:
fi
working-directory: ide-plugins

- name: Set version environment variable
run: echo "PLUGIN_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Build plugin
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx3g"
run: ./gradlew buildPlugin --no-daemon --stacktrace
working-directory: ide-plugins

- name: Get plugin version
id: plugin_version
run: |
VERSION=$(grep "^version" build.gradle.kts | cut -d'"' -f2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
PLUGIN_VERSION: ${{ github.event.inputs.version }}
run: ./gradlew buildPlugin -Pversion=${{ github.event.inputs.version }} --no-daemon --stacktrace
working-directory: ide-plugins

- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: picocode-plugin-${{ steps.plugin_version.outputs.version }}
name: intellij-plugin-${{ github.event.inputs.version }}
path: ide-plugins/build/distributions/*.zip

- name: Upload to Release
Expand Down
12 changes: 8 additions & 4 deletions ide-plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ PyCharm/IntelliJ IDEA plugin for PicoCode RAG Assistant with per-project persist
## Building the Plugin

```bash
cd plugin
cd ide-plugins
# Build with default version (0.2.0)
./gradlew buildPlugin

# Or build with a specific version
./gradlew buildPlugin -Pversion=0.2.1
```

The plugin ZIP will be in `build/distributions/`.
The plugin ZIP will be in `build/distributions/` with the name `intellij-plugin-{version}.zip`.

## Installation

Expand Down Expand Up @@ -72,8 +76,8 @@ Hover over the status to see detailed information including file and embedding c

To modify the plugin:

1. Open `plugin/` in IntelliJ IDEA
1. Open `ide-plugins/` in IntelliJ IDEA
2. Make changes to Kotlin files
3. Run `./gradlew runIde` to test in a sandbox IDE
4. Build with `./gradlew buildPlugin`
4. Build with `./gradlew buildPlugin` (optionally with `-Pversion=x.y.z`)

10 changes: 9 additions & 1 deletion ide-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = "com.picocode"
version = "0.2.0"
version = project.findProperty("version") as String? ?: "0.2.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -35,4 +35,12 @@ tasks {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
}
}

buildPlugin {
archiveBaseName.set("intellij-plugin")
}

patchPluginXml {
version.set(project.version.toString())
}
}
1 change: 0 additions & 1 deletion ide-plugins/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<idea-plugin>
<id>com.picocode.rag-assistant</id>
<name>PicoCode RAG Assistant</name>
<version>0.2.0</version>
<vendor>PicoCode</vendor>

<description><![CDATA[
Expand Down