-
-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (45 loc) · 1.55 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
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
java-version: [8, 11, 17]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- run: ./millw --no-server "__.publishM2Local" test-repo
publish-sonatype:
# TODO: also publish release-branches
if: github.repository == 'com-lihaoyi/mill-moduledefs' && startsWith( github.ref, 'refs/tags/')
needs: [test]
runs-on: ubuntu-latest
env:
LANG: "en_US.UTF-8"
LC_MESSAGES: "en_US.UTF-8"
LC_ALL: "en_US.UTF-8"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: Setup GPG secrets for publish
run: |
gpg --version
cat <(echo "${{ secrets.SONATYPE_PGP_PRIVATE_KEY }}") | base64 --decode | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Publish to Maven Central
run: ./millw --no-server --debug publishToSonatype --sonatypeCreds "${{ secrets.SONATYPE_USER }}:${{ secrets.SONATYPE_PASSWORD }}" --gpgArgs "--passphrase=${{ secrets.SONATYPE_PGP_PRIVATE_KEY_PASSWORD}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --artifactsFile PUBLISH_ONLY