Skip to content

Update mill-main to 0.12.2 #113

Update mill-main to 0.12.2

Update mill-main to 0.12.2 #113

Workflow file for this run

name: ci
on:
push:
branches:
- main
tags:
- '*'
pull_request:
paths-ignore:
- 'README.md'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
jobs:
style-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Check formatting
run:
./mill -i __.checkFormat
test:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
java: ['8', '17']
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Compile
run:
./mill -i __.compile
- name: Test
run:
./mill -i --debug __.test
publish-sonatype:
if: github.repository == 'scala-steward-org/mill-plugin' && contains(github.ref, 'refs/tags/')
needs: test
runs-on: ubuntu-latest
env:
PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
LANG: "en_US.UTF-8"
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
steps:
- uses: actions/checkout@v4
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Publish to Maven Central
run: |
if [[ $(git tag --points-at HEAD) != '' ]]; then
echo $PGP_PRIVATE_KEY | base64 --decode > gpg_key
gpg --import --no-tty --batch --yes gpg_key
rm gpg_key
./mill -i mill.scalalib.PublishModule/publishAll \
--publishArtifacts __.publishArtifacts \
--sonatypeUri "https://oss.sonatype.org/service/local" \
--sonatypeSnapshotUri "https://oss.sonatype.org/content/repositories/snapshots" \
--sonatypeCreds $SONATYPE_USER:$SONATYPE_PASSWORD \
--gpgArgs --passphrase=$PGP_PASSWORD,--no-tty,--pinentry-mode,loopback,--batch,--yes,-a,-b \
--readTimeout 600000 \
--awaitTimeout 600000 \
--release true \
--signed true
fi