-
Notifications
You must be signed in to change notification settings - Fork 29
46 lines (38 loc) · 1.17 KB
/
release.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
name: Publish jar
on:
push:
branches:
- main
jobs:
release:
name: Publish to Sonatype
runs-on: ubuntu-22.04
if: "startsWith(github.event.head_commit.message, 'chore: release')"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
cache: sbt
- name: Compile
run: sbt +compile
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.SIGNING_PRIVATE_KEY }}
passphrase: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}
fingerprint: ${{ secrets.SIGNING_PRIVATE_KEY_FINGERPRINT }}
- name: List GPG keys
run: gpg -K
- name: Publish Signed Artifacts
env:
PGP_PASSPHRASE: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}
run: sbt +publishSigned
- name: Release Bundle to Sonatype
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
run: sbt sonatypeBundleRelease