Skip to content

Commit

Permalink
chore: various updates (#16)
Browse files Browse the repository at this point in the history
This pr just updates a handful of stuff. The reason is that it was
failing in the [Steward
Runs](VirtusLab/scala-steward-repos#98 (comment)).
So this should  ensure that the steward plugin doesn't have any issues.

Note that I do rip out some of the custom stuff you have for sonatype
publishing and just replace it with
https://github.com/ckipp01/mill-ci-release mainly because it does almost
exactly what you were doing in here. Let me know if that's not ok and I
can revert it.
  • Loading branch information
ckipp01 authored Jan 9, 2023
1 parent 264fad7 commit 1f361c6
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 116 deletions.
10 changes: 0 additions & 10 deletions .github/scripts/gpg-setup.sh

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ jobs:
- uses: laughedelic/coursier-setup@v1
with:
jvm: 8
- run: .github/scripts/gpg-setup.sh
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
- name: Release
run: ./mill publishSonatype __.publishArtifacts
run: ./mill io.kipp.mill.ci.release.ReleaseModule/publishAll
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand Down
2 changes: 1 addition & 1 deletion .mill-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.7
0.10.10
39 changes: 18 additions & 21 deletions build.sc
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION`
import $ivy.`io.chris-kipp::mill-ci-release::0.1.5`
import $file.deps, deps.{Deps, Scala, Versions}
import $file.settings, settings.DependencyPublishModule

import java.io.File
import mill._, scalalib._
import scala.concurrent.duration.DurationInt
import io.kipp.mill.ci.release.CiReleaseModule

object dependency extends Cross[Dependency](Scala.all: _*)

class Dependency(val crossScalaVersion: String) extends CrossSbtModule with DependencyPublishModule {
class Dependency(val crossScalaVersion: String) extends CrossSbtModule with CiReleaseModule {

import mill.scalalib.publish._

def pomSettings = PomSettings(
description = artifactName(),
organization = "io.get-coursier",
url = "https://github.com/coursier/dependency",
licenses = Seq(License.`BSD-3-Clause`),
versionControl = VersionControl.github("coursier", "dependency"),
developers = Seq(
Developer("alexarchambault", "Alex Archambault","https://github.com/alexarchambault")
)
)

def compileIvyDeps = T{
val sv = scalaVersion()
if (sv.startsWith("2.")) Agg(Deps.scalaReflect(sv))
else Agg.empty[Dep]
}
object test extends Tests {
object test extends Tests with TestModule.Munit {
def ivyDeps = Agg(
Deps.expecty,
Deps.munit
)
def testFramework = "munit.Framework"
}
}

Expand Down Expand Up @@ -47,19 +60,3 @@ def mdoc(args: String*) = T.command {
stderr = os.Inherit
)
}

def publishSonatype(tasks: mill.main.Tasks[PublishModule.PublishData]) =
T.command {
val timeout = 10.minutes
val credentials = sys.env("SONATYPE_USERNAME") + ":" + sys.env("SONATYPE_PASSWORD")
val pgpPassword = sys.env("PGP_PASSPHRASE")
val data = define.Task.sequence(tasks.value)()

settings.publishSonatype(
credentials = credentials,
pgpPassword = pgpPassword,
data = data,
timeout = timeout,
log = T.ctx().log
)
}
12 changes: 6 additions & 6 deletions deps.sc
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import mill._, scalalib._

object Scala {
def scala212 = "2.12.13"
def scala213 = "2.13.6"
def scala3 = "3.0.0"
def scala212 = "2.12.17"
def scala213 = "2.13.10"
def scala3 = "3.2.0"
def all = Seq(scala212, scala213, scala3)
}

object Deps {
def expecty = ivy"com.eed3si9n.expecty::expecty:0.15.4"
def munit = ivy"org.scalameta::munit:0.7.29"
def expecty = ivy"com.eed3si9n.expecty::expecty:0.16.0"
def munit = ivy"org.scalameta::munit:1.0.0-M7"
def scalaReflect(sv: String) = ivy"org.scala-lang:scala-reflect:$sv"
}

object Versions {
def mdoc = "2.2.12"
def mdoc = "2.3.6"
}
74 changes: 0 additions & 74 deletions settings.sc

This file was deleted.

0 comments on commit 1f361c6

Please sign in to comment.