-
Notifications
You must be signed in to change notification settings - Fork 6
chore(ci): start using mill-ci-release #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: ["*"] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
uses: coursier/cache-action@v6 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: adopt | ||
java-version: 11 | ||
|
||
- name: Setup Mill | ||
uses: jodersky/setup-mill@master | ||
with: | ||
mill-version: 0.10.7 | ||
|
||
- name: Publish | ||
run: mill -j 0 -k -i --disable-ticker io.kipp.mill.ci.release.ReleaseModule/publishAll | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like I see this different for every CI I look at. I see you weren't using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
just a mistake on my end
It makes logs less verbose imho. Plus I think @keynmol was the one to implement There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it's purely for my ego. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Damn, I'll start using it immediately then. |
||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
ckipp01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import mill.define.Target | |
import mill.util.Jvm | ||
import $ivy.`com.lihaoyi::mill-contrib-bloop:$MILL_VERSION` | ||
import $ivy.`io.github.davidgregory084::mill-tpolecat::0.3.1` | ||
import $ivy.`de.tototec::de.tobiasroeser.mill.vcs.version::0.2.0` | ||
import $ivy.`io.chris-kipp::mill-ci-release::0.1.0` | ||
|
||
import os.Path | ||
import mill._ | ||
|
@@ -12,7 +12,7 @@ import scalajslib._ | |
import scalanativelib._ | ||
import mill.scalajslib.api._ | ||
import io.github.davidgregory084._ | ||
import de.tobiasroeser.mill.vcs.version.VcsVersion | ||
import io.kipp.mill.ci.release.CiReleaseModule | ||
|
||
object versions { | ||
val scala212Version = "2.12.16" | ||
|
@@ -270,12 +270,12 @@ trait RPCCrossPlatformModule extends Module { shared => | |
} | ||
} | ||
|
||
trait JsonRPCModule extends ScalaModule with PublishModule with scalafmt.ScalafmtModule { | ||
trait JsonRPCModule extends ScalaModule with CiReleaseModule with scalafmt.ScalafmtModule { | ||
def scalafmt() = T.command(reformat()) | ||
def fmt() = T.command(reformat()) | ||
def refreshedEnv = T.input(T.ctx().env) | ||
def publishVersion = T { | ||
if (refreshedEnv().contains("CI")) VcsVersion.vcsState().format() | ||
if (refreshedEnv().contains("CI")) super.publishVersion() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under the hood mill-ci-release is using this plus some goodies to add on |
||
else "dev" | ||
} | ||
override def scalacOptions = T { | ||
|
@@ -294,4 +294,8 @@ trait JsonRPCModule extends ScalaModule with PublishModule with scalafmt.Scalafm | |
Developer("Baccata", "Olivier Mélois", "https://github.com/baccata") | ||
) | ||
) | ||
|
||
override def sonatypeUri = "https://s01.oss.sonatype.org/service/local" | ||
override def sonatypeSnapshotUri = | ||
"https://s01.oss.sonatype.org/content/repositories/snapshots" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉