-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (64 loc) · 1.89 KB
/
ci.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
name: CI
on:
pull_request:
branches: ["**"]
push:
branches: ["**"]
tags: ["v[0-9]*"]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: temurin:1.17
apps: mill
- name: Build and test
run: mill -k __.testCached + __.publishLocal
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
if: github.event_name == 'push' || startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: temurin:1.17
apps: mill
- name: Import GPG key
run: echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
- name: Publish
run: >-
mill mill.scalalib.PublishModule/publishAll
--publishArtifacts __.publishArtifacts
--sonatypeCreds "${{ secrets.SONATYPE_CREDS }}"
--gpgArgs "--passphrase=${{ secrets.GPG_PASSPHRASE }},--batch,--pinentry-mode=loopback,--yes,-a,-b"
--release true
--sonatypeUri "https://s01.oss.sonatype.org/service/local"
--sonatypeSnapshotUri "https://s01.oss.sonatype.org/content/repositories/snapshots"
--readTimeout 600000
--awaitTimeout 600000