Skip to content

Commit 4be7156

Browse files
committed
.
1 parent 757b8b4 commit 4be7156

File tree

4 files changed

+317
-71
lines changed

4 files changed

+317
-71
lines changed

.github/workflows/actions.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,36 +46,23 @@ jobs:
4646
needs: test
4747
runs-on: ubuntu-latest
4848
env:
49-
SONATYPE_PGP_PRIVATE_KEY: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
50-
SONATYPE_PGP_PRIVATE_KEY_PASSWORD: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }}
51-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
52-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
49+
MILL_SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
50+
MILL_SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
51+
MILL_PGP_SECRET_BASE64: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}
52+
MILL_PGP_PASSPHRASE: ${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD }}
5353
LANG: "en_US.UTF-8"
5454
LC_MESSAGES: "en_US.UTF-8"
5555
LC_ALL: "en_US.UTF-8"
56+
5657
steps:
5758
- uses: actions/checkout@v3
58-
with:
59-
fetch-depth: 0
6059
- uses: actions/setup-java@v3
6160
with:
6261
distribution: 'temurin'
63-
java-version: 8
62+
java-version: 11
6463
- name: Publish to Maven Central
65-
run: |
66-
if [[ $(git tag --points-at HEAD) != '' ]]; then
67-
echo $SONATYPE_PGP_PRIVATE_KEY | base64 --decode > gpg_key
68-
gpg --import --no-tty --batch --yes gpg_key
69-
rm gpg_key
70-
./mill -i mill.scalalib.PublishModule/publishAll \
71-
--sonatypeCreds $SONATYPE_USER:$SONATYPE_PASSWORD \
72-
--gpgArgs --passphrase=$SONATYPE_PGP_PRIVATE_KEY_PASSWORD,--no-tty,--pinentry-mode,loopback,--batch,--yes,-a,-b \
73-
--publishArtifacts __.publishArtifacts \
74-
--readTimeout 600000 \
75-
--awaitTimeout 600000 \
76-
--release true \
77-
--signed true
78-
fi
64+
run: ./mill -i mill.scalalib.SonatypeCentralPublishModule/
65+
7966
- name: Create GitHub Release
8067
id: create_gh_release
8168
uses: actions/create-release@v1.1.4

.mill-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

build.mill

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
//| mill-version: 1.0.0-RC1-24-d74b52
2+
//| mvnDeps:
3+
//| - com.github.lolgab::mill-mima_mill1.0.0-RC1:0.2.0-M1
14
package build
2-
// plugins
3-
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.4.0`
4-
import $ivy.`com.github.lolgab::mill-mima::0.0.23`
55

66
// imports
77
import mill._, scalalib._, scalajslib._, scalanativelib._, publish._
8-
import de.tobiasroeser.mill.vcs.version.VcsVersion
8+
import mill.main.VcsVersion
99
import com.github.lolgab.mill.mima._
10-
import mill.scalalib.api.ZincWorkerUtil
10+
import mill.scalalib.api.JvmWorkerUtil
1111

1212
val communityBuildDottyVersion = sys.props.get("dottyVersion").toList
1313

@@ -17,10 +17,10 @@ val scalaVersions = Seq(
1717
"2.12.17",
1818
) ++ communityBuildDottyVersion
1919

20-
trait MimaCheck extends Mima {
21-
override def mimaPreviousVersions = T{
20+
trait MimaCheck extends ScalaModule with Mima {
21+
override def mimaPreviousVersions = Task {
2222
val sv = scalaVersion()
23-
val is3 = ZincWorkerUtil.isScala3(sv)
23+
val is3 = JvmWorkerUtil.isScala3(sv)
2424
val is211 = sv.startsWith("2.11.")
2525
val isNative = this.isInstanceOf[ScalaNativeModule]
2626
Seq(
@@ -39,7 +39,7 @@ trait MimaCheck extends Mima {
3939
)
4040

4141
def mimaReportBinaryIssues() =
42-
if (this.isInstanceOf[ScalaNativeModule] || this.isInstanceOf[ScalaJSModule]) T.command()
42+
if (this.isInstanceOf[ScalaNativeModule] || this.isInstanceOf[ScalaJSModule]) Task.Command{}
4343
else super.mimaReportBinaryIssues()
4444
}
4545

@@ -64,12 +64,12 @@ trait GenyPublishModule extends PublishModule with MimaCheck {
6464
}
6565

6666
trait Common extends CrossScalaModule {
67-
def millSourcePath = build.millSourcePath / "geny"
68-
def sources = T.sources(millSourcePath / "src")
67+
def moduleDir = build.moduleDir / "geny"
68+
def sources = Task.Sources("src")
6969
}
7070

7171
trait CommonTestModule extends ScalaModule with TestModule.Utest {
72-
override def ivyDeps = Agg(ivy"com.lihaoyi::utest::0.8.3")
72+
override def mvnDeps = Seq(mvn"com.lihaoyi::utest::0.8.3")
7373
}
7474

7575
object geny extends Module {
@@ -81,13 +81,13 @@ object geny extends Module {
8181
object js extends Cross[JSGenyModule](scalaVersions)
8282
trait JSGenyModule extends Common with ScalaJSModule with GenyPublishModule {
8383
def scalaJSVersion = "1.12.0"
84-
private def sourceMapOptions = T.task {
84+
private def sourceMapOptions = Task.Anon {
8585
val vcsState = VcsVersion.vcsState()
8686
vcsState.lastTag.collect {
8787
case tag if vcsState.commitsSinceLastTag == 0 =>
8888
val baseUrl = pomSettings().url.replace("github.com", "raw.githubusercontent.com")
89-
val sourcesOptionName = if(ZincWorkerUtil.isScala3(crossScalaVersion)) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
90-
s"$sourcesOptionName:${T.workspace.toIO.toURI}->$baseUrl/$tag/"
89+
val sourcesOptionName = if(JvmWorkerUtil.isScala3(crossScalaVersion)) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
90+
s"$sourcesOptionName:${Task.workspace.toIO.toURI}->$baseUrl/$tag/"
9191
}
9292
}
9393
override def scalacOptions = super.scalacOptions() ++ sourceMapOptions()

0 commit comments

Comments
 (0)