From 167804cb7d9c6e802fa0f28e08d96498564cdfff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Zu=CC=88hlke?= Date: Fri, 18 Oct 2024 09:09:21 +0200 Subject: [PATCH] Tiny improvements to the build * tell `actions/checkout` to fetch tags (instead of a 2nd `git fetch` invocation) * use `sbt/setup-sbt` to be sure `sbt` is present * remove no longer needed plugin `sbt-vspp` (see https://github.com/esbeetee/sbt-vspp) * simplify CI detection in `build.sbt` --- .github/workflows/ci.yml | 5 +++-- build.sbt | 4 ++-- project/plugins.sbt | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bca94d..54527eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,14 +16,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-tags: true - name: Set up JVM uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: ${{ matrix.java }} cache: 'sbt' - - - run: git fetch --tags -f + - uses: sbt/setup-sbt@v1 - run: # for git tests git config --global user.email "scalafmt@scalameta.org" && git config --global user.name "scalafmt" diff --git a/build.sbt b/build.sbt index c5a4ce8..f42c202 100644 --- a/build.sbt +++ b/build.sbt @@ -34,8 +34,8 @@ inThisBuild(List( ), resolvers ++= Resolver.sonatypeOssRepos("public"), scalaVersion := "2.12.20", - packageDoc / publishArtifact := sys.env.contains("CI"), - packageSrc / publishArtifact := sys.env.contains("CI"), + packageDoc / publishArtifact := insideCI.value, + packageSrc / publishArtifact := insideCI.value, )) publish / skip := true diff --git a/project/plugins.sbt b/project/plugins.sbt index 7353643..9c36a11 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,2 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.8.0") libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -addSbtPlugin("com.scalawilliam.esbeetee" % "sbt-vspp" % "0.4.13")