-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (38 loc) · 1.06 KB
/
nexus-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
name: Release
on:
workflow_dispatch:
push:
branches:
- 'feat/**' #publish snapshots
- 'main' #also publish snapshots - useful before releasing
tags:
- '**' #publish a release
jobs:
build:
runs-on: ubuntu-latest
env:
PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
PGP_SECRET : ${{ secrets.GPG_SECRET }}
GPG_OWNERTRUST : ${{ secrets.GPG_OWNERTRUST }}
SONATYPE_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.NEXUS_USERNAME }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: sbt
- name: Tests
run: sbt test
- name: Configure GPG Key
run: |
echo $PGP_SECRET | base64 --decode | gpg --import -v --batch
- name: Configure GPG Ownertrust
run: |
echo -n "$GPG_OWNERTRUST" | base64 --decode | gpg --import-ownertrust
- name: Release
run: |
sbt ci-release