aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: 06ad7c73cc9a410dec8ce1760bd5759bab77d53d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI

on:
  pull_request:
  push:
      branches:
        - master
      tags:
        - v*

jobs:

  build:
    strategy:
      matrix:
        scala: ["2.13.1", "2.12.10", "2.11.12", "2.10.7"]
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v1

    - uses: jodersky/setup-mill@master

    - name: Compile
      run: mill -D scala.version=${{matrix.scala}} commando.compile

    - name: Test
      if: matrix.scala == '2.13.1'
      run: mill -D scala.version=${{matrix.scala}} commando.test

    - name: Publish Tag
      if: startsWith(github.ref, 'refs/tags/')
      run: |
        echo "${{secrets.GPG_KEY}}" | gpg --import
        mill -D scala.version=${{matrix.scala}} mill.scalalib.PublishModule/publishAll \
          --sonatypeCreds "8VNUX6+2:${{secrets.SONATYPE_PASSWORD}}" \
          --publishArtifacts __.publishArtifacts