-
Notifications
You must be signed in to change notification settings - Fork 3
30 lines (28 loc) · 1.06 KB
/
sonatype.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
name: Sonatype Publish
on:
workflow_run:
workflows: [CI]
types: [completed]
jobs:
publish:
runs-on: blacksmith-2vcpu-ubuntu-2204
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'main' || startsWith(github.event.workflow_run.head_branch, 'v')) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Coursier cache
uses: useblacksmith/coursier-cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: zulu:11.0.10
apps: sbt scala
- uses: taiki-e/install-action@parse-changelog
- name: Set build timestamp
run: echo "SOURCE_DATE_EPOCH=$(date -d $(parse-changelog CHANGELOG.md -t | rev | cut -d' ' -f1 | rev) '+%s')" >> "$GITHUB_ENV"
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}