File tree Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Expand file tree Collapse file tree 3 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 11name : Sourcegraph
22on :
33 push :
4- branches :
5- - main
6-
4+ branches : ["main"]
5+ tags : ["v*"]
76 pull_request :
7+ branches : ["*"]
88
99jobs :
1010 scip :
1111 runs-on : ubuntu-latest
1212 name : " Upload SCIP"
1313 steps :
1414 - uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+
1518 - uses : actions/setup-java@v3
1619 with :
1720 distribution : ' temurin'
1821 java-version : 8
1922 cache : ' sbt'
2023
24+ - name : Publish CLI locally
25+ run : sbt publishLocal dumpScipJavaVersion
26+
27+ - name : Produce SCIP data of scip-java repository
28+ run : sbt -Dscip-java-version=$(cat VERSION) sourcegraphCompile
29+
30+ - name : Upload index.scip
31+ uses : actions/upload-artifact@master
32+ with :
33+ path : target/sbt-sourcegraph/index.scip
34+ name : index.scip
35+ if-no-files-found : error
36+
2137 - name : Install src
38+ if : startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
2239 run : yarn global add @sourcegraph/src
2340
24- - name : sbt sourcegraphUpload
25- run : sbt sourcegraphUpload
26-
41+ - name : Upload sourcegraph data
42+ if : startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
43+ run : sbt -Dscip-java-version=$(cat VERSION) sourcegraphUpload
2744 env :
2845 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -61,3 +61,5 @@ bazel-scip-java
6161bazel-out
6262bazel-testlogs
6363bazel-lsif-java
64+
65+ VERSION
Original file line number Diff line number Diff line change @@ -436,6 +436,8 @@ lazy val bench = project
436436lazy val docs = project
437437 .in(file(" scip-java-docs" ))
438438 .settings(
439+ publishLocal / skip := true ,
440+ publish / skip := true ,
439441 moduleName := " scip-java-docs" ,
440442 mdocOut :=
441443 (ThisBuild / baseDirectory).value / " website" / " target" / " docs" ,
@@ -525,3 +527,12 @@ lazy val fatjarPackageSettings = List[Def.Setting[_]](
525527 ).transform(node).head
526528 }
527529)
530+
531+ lazy val dumpScipJavaVersion = taskKey[Unit ](
532+ " Dump the version of scip-java tool to a VERSION file"
533+ )
534+ dumpScipJavaVersion := {
535+ val versionValue = (cli / version).value
536+
537+ IO .write((ThisBuild / baseDirectory).value / " VERSION" , versionValue)
538+ }
You can’t perform that action at this time.
0 commit comments