Skip to content

Sonatype Publish

Sonatype Publish #169

Workflow file for this run

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
persist-credentials: false
- 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 }}