Build maintenance #368
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scala CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: [published] | |
jobs: | |
build: | |
if: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Pull all history with tags for correct versionning | |
run: git fetch --prune --unshallow | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache SBT ivy cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/.ivy2/cache | |
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sc') }} | |
restore-keys: | | |
${{ runner.os }}-sbt-ivy-cache- | |
- name: Cache SBT | |
uses: actions/cache@v1 | |
with: | |
path: ~/.sbt | |
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sc') }} | |
restore-keys: | | |
${{ runner.os }}-sbt- | |
- name: Cache Mill | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/mill | |
key: ${{ runner.os }}-mill-${{ hashFiles('**/build.sc') }} | |
restore-keys: | | |
${{ runner.os }}-mill- | |
- name: Cache Coursier | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/coursier | |
key: ${{ runner.os }}-coursier-${{ hashFiles('**/build.sc') }} | |
restore-keys: | | |
${{ runner.os }}-coursier- | |
- name: Cache Out | |
uses: actions/cache@v1 | |
with: | |
path: ./out | |
key: ${{ runner.os }}-out-${{ hashFiles('**/build.sc') }} | |
restore-keys: | | |
${{ runner.os }}-out- | |
- name: Checks | |
run: | | |
git config --global user.name "CI" | |
./mill all __.checkFormat __.docJar __.test | |
# ./mill all __.checkFormat "__.fix --check" __.docJar __.test | |
- name: Status Check | |
run: | | |
git status | |
- name: Publish | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || github.event_name == 'release' | |
run: | | |
echo "${{ secrets.PGP_SECRET }}" > private.key | |
gpg --batch --yes --import private.key | |
rm private.key | |
./mill mill.scalalib.PublishModule/publishAll --sonatypeCreds ${{ secrets.SONATYPE_USERNAME }}:${{ secrets.SONATYPE_PASSWORD }} --gpgArgs --passphrase,${{ secrets.PGP_PASSPHRASE }},--batch,--yes,-a,-b,--pinentry-mode,loopback --publishArtifacts __.publishArtifacts --awaitTimeout 900000 --readTimeout 600000 --release true |