diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d82655..f7c67a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,51 +23,41 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.17] + scala: [2.12.18] java: [temurin@11, temurin@17] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 + cache: sbt - name: Setup Java (temurin@17) if: matrix.java == 'temurin@17' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 - - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + cache: sbt - name: Check that workflows are up to date - run: sbt ++${{ matrix.scala }} githubWorkflowCheck + run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - - run: sbt ++${{ matrix.scala }} test scripted + - run: sbt '++ ${{ matrix.scala }}' test scripted - name: Compress target directories run: tar cf targets.tar target project/target - name: Upload target directories - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} path: targets.tar @@ -79,47 +69,37 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.17] + scala: [2.12.18] java: [temurin@11] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 + cache: sbt - name: Setup Java (temurin@17) if: matrix.java == 'temurin@17' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 + cache: sbt - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - - name: Download target directories (2.12.17) - uses: actions/download-artifact@v2 + - name: Download target directories (2.12.18) + uses: actions/download-artifact@v4 with: - name: target-${{ matrix.os }}-2.12.17-${{ matrix.java }} + name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }} - - name: Inflate target directories (2.12.17) + - name: Inflate target directories (2.12.18) run: | tar xf targets.tar rm targets.tar @@ -129,4 +109,4 @@ jobs: PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - run: sbt ++${{ matrix.scala }} ci-release + run: sbt ci-release diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 547aaa4..bfc865d 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -17,6 +17,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Delete artifacts + shell: bash {0} run: | # Customize those three lines with your repository and credentials: REPO=${GITHUB_API_URL}/repos/${{ github.repository }} @@ -25,7 +26,7 @@ jobs: ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } # A temporary file which receives HTTP response headers. - TMPFILE=/tmp/tmp.$$ + TMPFILE=$(mktemp) # An associative array, key: artifact name, value: number of artifacts of that name. declare -A ARTCOUNT diff --git a/README.md b/README.md index 4e1b562..f8a3e30 100644 --- a/README.md +++ b/README.md @@ -165,5 +165,5 @@ Feel free to ping contributors for code review or discussions. Pull requests are [maven-central]: https://maven-badges.herokuapp.com/maven-central/com.lightbend.paradox/sbt-paradox-project-info [maven-central-badge]: https://maven-badges.herokuapp.com/maven-central/com.lightbend.paradox/sbt-paradox-project-info/badge.svg -[github-actions]: https://github.com/lightbend/sbt-paradox-project-info/actions/workflows/ci.yml?query=branch%3Amaster -[github-actions-badge]: https://github.com/lightbend/sbt-paradox-project-info/actions/workflows/ci.yml/badge.svg?branch=master +[github-actions]: https://github.com/lightbend/sbt-paradox-project-info/actions/workflows/ci.yml?query=branch%3Amain +[github-actions-badge]: https://github.com/lightbend/sbt-paradox-project-info/actions/workflows/ci.yml/badge.svg?branch=main diff --git a/RELEASING.md b/RELEASING.md index bb3dc69..438ea5c 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,10 +1,5 @@ # Releasing -1. Check [closed issues without a milestone](https://github.com/lightbend/sbt-paradox-project-info/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20no%3Amilestone) and either assign them the upcoming release milestone or 'invalid' -1. Create a [new release](https://github.com/lightbend/sbt-paradox-project-info/releases/new) with: - * the next tag version (e.g. `v0.2`) - * title and release description including notable changes - * link to the [milestone](https://github.com/lightbend/sbt-paradox-project-info/milestones) showing an overview of closed issues for this release - * overview of contributors generated by [`sbt-authors`](https://github.com/2m/authors) (eg. `sbt authors v0.1 v0.2`) -1. Travis CI will start a [CI build](https://travis-ci.org/lightbend/sbt-paradox-project-info/builds) for the new tag and publish artifacts to Bintray. -1. Close the milestone for this release and start a new one. +* Draft a [new release on GitHub](https://github.com/lightbend/sbt-paradox-project-info/releases) +* Tag it (with a `v` prefix) +* Github actions should automatically release to maven-central diff --git a/build.sbt b/build.sbt index c29c616..c38eab2 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -ThisBuild / scalaVersion := "2.12.17" +ThisBuild / scalaVersion := "2.12.18" sbtPlugin := true @@ -54,9 +54,7 @@ ThisBuild / githubWorkflowPublish := Seq( ) ) -ThisBuild / test / publishArtifact := false -ThisBuild / pomIncludeRepository := (_ => false) -sonatypeProfileName := "com.lightbend" +sonatypeProfileName := "com.lightbend" ThisBuild / githubWorkflowJavaVersions := List( JavaSpec.temurin("11"), diff --git a/project/build.properties b/project/build.properties index c8fcab5..abbbce5 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.9.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index aad5295..70db144 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.5") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.22.0") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")