diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d48b340..65052726 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,9 +16,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: coursier/setup-action@v1.1.2 with: - java-version: 11 + jvm: adopt:11 - name: Cache sbt uses: coursier/cache-action@v6 with: @@ -36,13 +36,13 @@ jobs: JAVA_OPTS: -Xmx4G steps: - name: Checkout - uses: actions/checkout@v2 + uses: coursier/setup-action@v1.1.2 with: fetch-depth: 0 # checkout tags so that dynver works properly (we need the version for MiMa) - name: Set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 11 + jvm: adopt:11 - name: Cache sbt uses: coursier/cache-action@v6 with: @@ -50,6 +50,35 @@ jobs: - name: Check MiMa # disable for major releases run: sbt -v core/mimaReportBinaryIssues + sourcegraph: + name: Upload index to sourcegraph + needs: [ci] + # run on external PRs, but not on internal PRs since those will be run by push to branch + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-20.04 + env: + JAVA_OPTS: -Xmx4G + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: coursier/setup-action@v1.1.2 + with: + jvm: adopt:11 + apps: lsif-java + - name: Cache sbt + uses: coursier/cache-action@v6 + with: + extraKey: sbt-cache-${{ runner.os }} + - name: Generate LSIF + run: lsif-java index + - name: Upload LSIF data + uses: sourcegraph/lsif-upload-action@master + with: + endpoint: https://sourcegraph.com + github_token: ${{ secrets.GITHUB_TOKEN }} + file: dump.lsif + publish: name: Publish release needs: [ci] @@ -61,9 +90,9 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: coursier/setup-action@v1.1.2 with: - java-version: 11 + jvm: adopt:11 - name: Cache sbt uses: coursier/cache-action@v6 with: