This repository has been archived by the owner on Jul 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.52 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
on:
push:
pull_request:
branches: [main]
env:
# This is the java version that will trigger an upload to the SNAPSHOT maven store
# Other Java versions within the matrix are just unit tested
MAIN_JAVA_VERSION: 1.8
# We will only publish the build artifacts to our pseudo snapshot repo for a push on
# this branch
PUBLISH_BRANCH: refs/heads/mill-0.7
jobs:
build:
strategy:
matrix:
java-version: [11]
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- run: git fetch --prune --tags --unshallow
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Setup GPG secrets
run: |
gpg --version
cat <(echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | base64 -d | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- run: ./millw -i show pluginVersion
- run: ./millw -i __.testCached
- name: Publish to Maven Central
if: ${{ matrix.java-version == env.MAIN_JAVA_VERSION && github.ref == env.PUBLISH_BRANCH && github.event_name == 'push' }}
run: ./millw mill.scalalib.PublishModule/publishAll --sonatypeCreds "${{ secrets.OSSRH_USER}}:${{ secrets.OSSRH_PASSWORD }}" --gpgArgs "--passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD}},--batch,--yes,-a,-b,--pinentry-mode,loopback" --publishArtifacts __.publishArtifacts --readTimeout 600000 --release true --signed true