Skip to content

Commit

Permalink
feature: custom plugin repo
Browse files Browse the repository at this point in the history
  • Loading branch information
popovanton0 committed Jul 4, 2024
1 parent c7dba98 commit b14ab55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish-ide-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

jobs:
publish-gradle-plugin:
publish-ide-plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
Expand All @@ -19,12 +19,12 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build plugin
run: ./gradlew buildKelpIdePlugin readVersion

- name: Fetch plugin version
id: print_version
run: ./gradlew printVersion

- name: Build plugin
run: ./gradlew buildKelpIdePlugin
run: echo "version=$(cat build/VERSION)" >> $GITHUB_OUTPUT

- name: Release plugin
uses: ncipollo/release-action@v1
Expand Down
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ tasks.register<Copy>("buildKelpIdePlugin") {
into(toGitHubReleaseDir)
}

tasks.register("printVersion") {
tasks.register("readVersion") {
inputs.property("version", project.version)
outputs.file(layout.buildDirectory.file("VERSION"))
doLast {
exec { commandLine("echo \"plugin-version=${inputs.properties.values.first()}\" >> \$GITHUB_OUTPUT") }
outputs.files.first().writeText(inputs.properties.values.first().toString())
}
}

0 comments on commit b14ab55

Please sign in to comment.