Publish #11
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | ||
|
Check failure on line 1 in .github/workflows/publish.yaml
|
||
| 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' | ||