Skip to content

Commit

Permalink
try mill-ci-release
Browse files Browse the repository at this point in the history
  • Loading branch information
novakov-alexey committed Jun 17, 2024
1 parent d13d70e commit 50d351b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 20 deletions.
53 changes: 34 additions & 19 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,42 @@ jobs:
needs: [checks, tests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Pull all history with tags for correct versionning
run: git fetch --prune --unshallow
- name: Setup Java 11
uses: actions/setup-java@v1
- uses: actions/checkout@v3
with:
java-version: 11.0.x
- uses: jodersky/setup-mill@master
fetch-depth: 0
- uses: actions/setup-java@v3
with:
mill-version: 0.11.7
- name: Publish
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'release'
distribution: 'temurin'
java-version: '17'
- run: ./mill -i io.kipp.mill.ci.release.ReleaseModule/publishAll
env:
PGP_PASSPHRASE: ${{ secrets.GPG_PASSWORD }}
PGP_SECRET: ${{ secrets.PGP_SECRET_KEY }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_CREDENTIALS }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_CREDENTIALS: ${{ secrets.SONATYPE_CREDENTIALS }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
run: |
echo "${{ secrets.PGP_SECRET_KEY }}" | base64 --decode > private.key
gpg --batch --yes --no-tty --import private.key
rm private.key
export GPG_TTY=$(tty)
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Pull all history with tags for correct versionning
# run: git fetch --prune --unshallow
# - name: Setup Java 11
# uses: actions/setup-java@v1
# with:
# java-version: 11.0.x
# - uses: jodersky/setup-mill@master
# with:
# mill-version: 0.11.7
# - name: Publish
# if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'release'
# env:
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
# SONATYPE_CREDENTIALS: ${{ secrets.SONATYPE_CREDENTIALS }}
# GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
# run: |
# echo "${{ secrets.PGP_SECRET_KEY }}" | base64 --decode > private.key
# gpg --batch --yes --no-tty --import private.key
# rm private.key
# export GPG_TTY=$(tty)

mill mill.scalalib.PublishModule/publishAll __.publishArtifacts $SONATYPE_USERNAME:$SONATYPE_CREDENTIALS --gpgArgs --passphrase=$GPG_PASSWORD,--batch,--yes,-a,-b,--pinentry-mode,loopback
# mill mill.scalalib.PublishModule/publishAll __.publishArtifacts $SONATYPE_USERNAME:$SONATYPE_CREDENTIALS --gpgArgs --passphrase=$GPG_PASSWORD
5 changes: 4 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import $ivy.`com.goyeau::mill-git::0.2.5`
import $ivy.`com.lihaoyi::mill-contrib-bsp:0.8.0-15-080141`
import $ivy.`io.github.davidgregory084::mill-tpolecat:0.1.4`
import $ivy.`io.chris-kipp::mill-ci-release::0.1.10`
import $file.project.Dependencies, Dependencies.Dependencies._
import com.goyeau.mill.git.GitVersionedPublishModule
import io.github.davidgregory084.TpolecatModule
import io.kipp.mill.ci.release.CiReleaseModule
import mill._
import scalalib._
import mill.scalalib._
Expand All @@ -22,7 +24,8 @@ object `http4s-spnego` extends Cross[Http4sSpnegoModule](Seq(ver3, ver213))
trait Http4sSpnegoModule
extends CrossScalaModule
with ScalafmtModule
with GitVersionedPublishModule {
with GitVersionedPublishModule
with CiReleaseModule {
override def scalacOptions =
super.scalacOptions().filter(_ != "-Wunused:imports").filter(_ != "-Wunused:explicits") ++
(if (scalaVersion().startsWith("2.12")) Seq("-Ypartial-unification") else Seq.empty)
Expand Down

0 comments on commit 50d351b

Please sign in to comment.