-
Notifications
You must be signed in to change notification settings - Fork 17
38 lines (37 loc) · 1.29 KB
/
publish.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
name: Publish
on:
push:
branches:
- master
pull_request:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: coursier/[email protected]
- uses: coursier/[email protected]
with:
jvm: 11
- name: Publish local
run: cd publish && ./mill -i __.publishLocal
if: github.ref != 'refs/heads/master'
env:
PUBLISH_SECRET_KEY: ${{ secrets.PUBLISH_SECRET_KEY }}
PUBLISH_SECRET_KEY_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
- run: echo "$PGP_SECRET" | base64 --decode | gpg --batch --import
if: github.ref == 'refs/heads/master'
env:
PGP_SECRET: ${{ secrets.PUBLISH_SECRET_KEY }}
- name: Publish
run: cd publish && ./mill -i ci.publishSonatype --tasks __.publishArtifacts
if: github.ref == 'refs/heads/master'
env:
PUBLISH_SECRET_KEY: ${{ secrets.PUBLISH_SECRET_KEY }}
PUBLISH_SECRET_KEY_PASSWORD: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}