From 313e7778b114e66db69d14f89fe69ef5992d6f60 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 16 Aug 2022 14:35:45 +0200 Subject: [PATCH] chore(ci): align usage of setup-java I saw in one place this was using setup-java but the rest setup-scala. Another opinionated change, but since setup-java also has the default sbt launcher and built-in sbt caching I think it's a better choice to just use that unless it's being included for another reason. This also makes a small change on the sourcegraph upload to use the npm installed src instead of curling it down manually. --- .github/workflows/ci.yml | 10 ++++++++-- .github/workflows/mdoc.yml | 6 +++++- .github/workflows/release-docker.yml | 6 +++++- .github/workflows/release-maven.yml | 6 +++++- .github/workflows/sourcegraph.yml | 24 +++++++++++++++--------- 5 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e73e7c7..a4ce0c60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,11 @@ jobs: os: [ubuntu-latest] steps: - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: 8 + cache: 'sbt' - uses: actions/setup-go@v2 with: go-version: "^1.13.1" @@ -39,5 +41,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v13 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + cache: 'sbt' - run: sbt checkAll diff --git a/.github/workflows/mdoc.yml b/.github/workflows/mdoc.yml index ca3ec265..c6518dc2 100644 --- a/.github/workflows/mdoc.yml +++ b/.github/workflows/mdoc.yml @@ -10,7 +10,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: olafurpg/setup-scala@v13 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + cache: 'sbt' - run: sbt docs/docusaurusPublishGhpages env: GIT_DEPLOY_KEY: ${{ secrets.GIT_DEPLOY_KEY }} diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index d290f202..ead2f2ff 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -9,7 +9,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: olafurpg/setup-scala@v13 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + cache: 'sbt' - uses: docker/setup-buildx-action@v1 - name: Login to DockerHub uses: docker/login-action@v1 diff --git a/.github/workflows/release-maven.yml b/.github/workflows/release-maven.yml index c6c42d8c..0ffa9051 100644 --- a/.github/workflows/release-maven.yml +++ b/.github/workflows/release-maven.yml @@ -10,7 +10,11 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 - - uses: olafurpg/setup-scala@v13 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + cache: 'sbt' - name: Publish ${{ github.ref }} run: sbt ci-release env: diff --git a/.github/workflows/sourcegraph.yml b/.github/workflows/sourcegraph.yml index 8e5f24ef..d1e2eceb 100644 --- a/.github/workflows/sourcegraph.yml +++ b/.github/workflows/sourcegraph.yml @@ -3,24 +3,30 @@ on: push: branches: - main - - olafurpg/lets-go - pull_request: + + pull_request: + jobs: scip: runs-on: ubuntu-latest name: "Upload SCIP" steps: - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v13 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 8 + cache: 'sbt' + - uses: actions/setup-go@v2 with: go-version: "1.15.6" + + - name: Install src + run: yarn global add @sourcegraph/src + - name: sbt sourcegraphUpload - run: | - mkdir -p bin - curl -L https://sourcegraph.com/.api/src-cli/src_linux_amd64 -o bin/src - chmod +x bin/src - export PATH="$PATH:$PWD/bin" - sbt sourcegraphUpload + run: sbt sourcegraphUpload + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}