-
-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (78 loc) · 3 KB
/
build.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
on:
push:
branches:
- main
tags:
- '**'
pull_request:
# cancel older runs of a pull request;
# this will not cancel anything for normal git pushes
concurrency:
group: cancel-old-pr-runs-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
java-version: [8, 11]
targets:
- "__.publishLocal testRepo"
- "core.__.test"
- "itest[0.11.1].test"
- "itest[0.11.0].test"
- "itest[0.10.12].test"
- "itest[0.10.0].test"
- "itest[0.9.12].test"
- "itest[0.9.3].test"
- "itest[0.8.0].test"
- "itest[0.7.4].test"
- "itest[0.7.0].test"
- "itest[0.6.3].test"
- "itest[0.6.0].test"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.os == 'windows-latest' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: temurin
- run: ./millw -i -k ${{ matrix.targets }}
if: matrix.os != 'windows-latest'
- run: .\millw.bat -i -k ${{ matrix.targets }}
if: matrix.os == 'windows-latest'
- run: ./millw -i -j 0 -k __.scoverage.xmlReport
if: matrix.os != 'windows-latest'
- run: ./millw.bat -i -j 0 -k __.scoverage.xmlReport
if: matrix.os == 'windows-latest'
- name: Upload scoverage reports to codecov.io
uses: codecov/codecov-action@v3
with:
files: ./out/core/0.11/scoverage/xmlReport.dest/scoverage.xml,./out/core/0.10/scoverage/xmlReport.dest/scoverage.xml,./out/core/0.9/scoverage/xmlReport.dest/scoverage.xml,./out/core/0.7/scoverage/xmlReport.dest/scoverage.xml,./out/core/0.6/scoverage/xmlReport.dest/scoverage.xml
continue-on-error: true
publish:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
# only run one publish job for the same sha at the same time
# e.g. when a main-branch push is also tagged
concurrency: publish-${{ github.sha }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: Setup GPG secrets
run: |
gpg --version
cat <(echo "${{ secrets.GPG_SECRET_KEY }}") | base64 --decode | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish to Maven Central
run: ./millw -i mill.scalalib.PublishModule/publishAll --sonatypeCreds "${{ secrets.SONATYPE_CREDS }}" --gpgArgs "--passphrase=${{ secrets.GPG_SECRET_KEY_PASS}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --publishArtifacts __.publishArtifacts --readTimeout 600000 --awaitTimeout 600000 --release true --signed true