-
Notifications
You must be signed in to change notification settings - Fork 23
54 lines (51 loc) · 1.79 KB
/
scip-java.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Sourcegraph
on:
push:
paths:
- '**.kt'
- '**.java'
- '**.kts'
- '.github/workflows/scip-java.yml'
jobs:
scip-java:
if: github.repository == 'sourcegraph/jetbrains'
runs-on: ubuntu-latest
name: "Upload SCIP"
steps:
- uses: actions/checkout@v3
- run: yarn global add pnpm@8.6.7
- run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
shell: bash
id: pnpm-cache
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-${{ matrix.node }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-${{ matrix.node }}-pnpm-store-k
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: coursier/setup-action@v1
with:
jvm: 'zulu:11'
apps: scip-java
- name: Generate SCIP File
run: scip-java index --build-tool=gradle
- name: Install src
run: yarn global add @sourcegraph/src
- name: Upload SCIP to Cloud
run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
env:
SRC_ENDPOINT: https://sourcegraph.com/
SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_DOTCOM }}
- name: Upload SCIP to S2
run: src code-intel upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
env:
SRC_ENDPOINT: https://sourcegraph.sourcegraph.com/
SRC_ACCESS_TOKEN: ${{ secrets.SRC_ACCESS_TOKEN_S2 }}