1616 - name : Checkout
1717 uses : actions/checkout@v2
1818 - name : Set up JDK 11
19- uses : actions /setup-java @v1
19+ uses : coursier /setup-action @v1.1.2
2020 with :
21- java-version : 11
21+ jvm : adopt: 11
2222 - name : Cache sbt
2323 uses : coursier/cache-action@v6
2424 with :
@@ -40,16 +40,45 @@ jobs:
4040 with :
4141 fetch-depth : 0 # checkout tags so that dynver works properly (we need the version for MiMa)
4242 - name : Set up JDK 11
43- uses : actions /setup-java @v1
43+ uses : coursier /setup-action @v1.1.2
4444 with :
45- java-version : 11
45+ jvm : adopt: 11
4646 - name : Cache sbt
4747 uses : coursier/cache-action@v6
4848 with :
4949 extraKey : sbt-cache-${{ runner.os }}
5050 - name : Check MiMa # disable for major releases
5151 run : sbt -v core/mimaReportBinaryIssues
5252
53+ sourcegraph :
54+ name : Upload index to sourcegraph
55+ needs : [ci]
56+ # run on external PRs, but not on internal PRs since those will be run by push to branch
57+ if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
58+ runs-on : ubuntu-20.04
59+ env :
60+ JAVA_OPTS : -Xmx4G
61+ steps :
62+ - name : Checkout
63+ uses : actions/checkout@v2
64+ - name : Set up JDK 11
65+ 66+ with :
67+ jvm : adopt:11
68+ apps : lsif-java
69+ - name : Cache sbt
70+ uses : coursier/cache-action@v6
71+ with :
72+ extraKey : sbt-cache-${{ runner.os }}
73+ - name : Generate LSIF
74+ run : lsif-java index
75+ - name : Upload LSIF data
76+ uses : sourcegraph/lsif-upload-action@master
77+ with :
78+ endpoint : https://sourcegraph.com
79+ github_token : ${{ secrets.GITHUB_TOKEN }}
80+ file : dump.lsif
81+
5382 publish :
5483 name : Publish release
5584 needs : [ci]
6190 - name : Checkout
6291 uses : actions/checkout@v2
6392 - name : Set up JDK 11
64- uses : actions /setup-java @v1
93+ uses : coursier /setup-action @v1.1.2
6594 with :
66- java-version : 11
95+ jvm : adopt: 11
6796 - name : Cache sbt
6897 uses : coursier/cache-action@v6
6998 with :
0 commit comments