-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (39 loc) · 1.23 KB
/
sbt-build.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
name: Build & Publish
on:
#workflow_dispatch:
push:
branches:
- feature/artifact-publish
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK And SBT
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "21"
cache: "sbt"
- name: Decrypt and Import GPG Key
run: |
gpgconf --kill gpg-agent || true
gpgconf --launch gpg-agent || true
echo "$GPG_SECRET" | base64 --decode | gpg --batch --no-tty --import
env:
GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Publish to Maven Repository
run: sbt ci-release
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
PGP_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
# - name: Publish to GitHub Packages
# run: sbt publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}