Skip to content

Commit

Permalink
Add GHA cache for intelliJ
Browse files Browse the repository at this point in the history
  • Loading branch information
RustedBones committed Feb 28, 2024
1 parent 1b6513e commit b354b15
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ jobs:
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Cache
uses: actions/cache@v4
with:
path: ~/.scio-ideaPluginIC
key: idea-2022.3.1

- name: Check that workflows are up to date
run: sbt githubWorkflowCheck

Expand Down Expand Up @@ -100,6 +106,12 @@ jobs:
if: matrix.java == 'corretto@17' && steps.setup-java-corretto-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Cache
uses: actions/cache@v4
with:
path: ~/.scio-ideaPluginIC
key: idea-2022.3.1

- name: Download target directories (2.13)
uses: actions/download-artifact@v4
with:
Expand Down
21 changes: 16 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ disablePlugins(TypelevelCiSigningPlugin)
lazy val Guava = "com.google.guava" % "guava" % "32.1.3-jre"
lazy val Scalatest = "org.scalatest" %% "scalatest" % "3.2.18"

// idea settings
lazy val intelliJVersion = "2022.3.1"
ThisBuild / intellijPluginName := "scio-idea"
ThisBuild / intellijPlatform := IntelliJPlatform.IdeaCommunity
ThisBuild / intellijBuild := intelliJVersion

// project
ThisBuild / tlBaseVersion := "0.1"
Expand All @@ -46,11 +51,17 @@ ThisBuild / githubWorkflowPublish := Seq(
env = Map("IJ_PLUGIN_REPO_TOKEN" -> "${{ secrets.IJ_PLUGIN_TOKEN }}")
)
)

// idea settings
ThisBuild / intellijPluginName := "scio-idea"
ThisBuild / intellijPlatform := IntelliJPlatform.IdeaCommunity
ThisBuild / intellijBuild := "2022.3.1" // 1st java 17 version
val cache = UseRef.Public("actions", "cache", "v4")
ThisBuild / githubWorkflowGeneratedCacheSteps := Seq(
WorkflowStep.Use(
name = Some("Cache"),
ref = cache,
params = Map(
"path" -> "~/.scio-ideaPluginIC",
"key" -> s"idea-$intelliJVersion",
)
)
)

lazy val scioIdeaPlugin: Project = project
.in(file("."))
Expand Down

0 comments on commit b354b15

Please sign in to comment.