Skip to content

Release

Release #50

Workflow file for this run

name: Release
# Adapted from https://github.com/beautiful-scala/scalastyle/blob/master/.github/workflows/release.yml
on:
push:
tags:
- v*
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
cache: sbt
- name: Prepare PGP
env:
PGP_SECRET: ${{ secrets.PgpSecret }}
run: |
gpg --version
mkdir ~/.gnupg && chmod 700 ~/.gnupg
echo use-agent >> ~/.gnupg/gpg.conf
echo pinentry-mode loopback >> ~/.gnupg/gpg.conf
echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf
chmod 600 ~/.gnupg/*
echo RELOADAGENT | gpg-connect-agent
echo $PGP_SECRET | base64 --decode | gpg --import --no-tty --batch --yes
- name: Publish to Maven Central
env:
SONATYPE_USERNAME: ${{ secrets.SonatypeUsername }}
SONATYPE_PASSWORD: ${{ secrets.SonatypePassword }}
PGP_PASSPHRASE: ${{ secrets.PgpPassphrase }}
run: |
sbt +common-build/publishSigned
sbt releaseArtifacts