-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (47 loc) · 1.46 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: publish
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Coursier
uses: actions/cache@v4
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-coursier-${{ hashFiles('**/*.sbt') }}
- name: Cache SBT
uses: actions/cache@v4
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }}
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Import Sonatype GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.PGP_SECRET }}
passphrase: ${{ secrets.PGP_PASSPHRASE }}
- name: Publish to Sonatype
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
sbt -Dsbt.color=always -Dsbt.supershell=false publishSigned sonatypeBundleRelease
- name: Publish API docs to GitHub Pages
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
sbt -Dsbt.color=always -Dsbt.supershell=false ghpagesPushSite
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}