Skip to content

Publish

Publish #11

Workflow file for this run

name: Publish

Check failure on line 1 in .github/workflows/publish.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yaml

Invalid workflow file

(Line: 39, Col: 13): Unexpected symbol: '"sonatype"'. Located at position 28 within expression: env.PUBLISH_TO_REGISTRY != "sonatype", (Line: 44, Col: 13): Unexpected symbol: '"sonatype"'. Located at position 28 within expression: env.PUBLISH_TO_REGISTRY == "sonatype"
on:
push:
tags: [ '*' ]
env:
CI: true
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PGP_PASSPHRASE: ${{secrets.PGP_PASSPHRASE}}
PUBLISH_TO_REGISTRY: sonatype
jobs:
publish:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
distribution: zulu
java-version: 17
cache: sbt
- name: Install sbt
uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1.1.14
- name: Run tests
run: sbt test
- name: Import PGP key
run: echo -e "${{secrets.GPG_KEY}}" | gpg --batch --import
- name: Publish to GitHub Pakcages
if: env.PUBLISH_TO_REGISTRY != "sonatype"
run: |
sbt publishSigned
- name: Publish to sonatype
if: env.PUBLISH_TO_REGISTRY == "sonatype"
run: |
sbt ';publishSigned; sonatypeBundleRelease'