From c29ddc74c70fe7c9e793e2c5e1d12edf98fd5590 Mon Sep 17 00:00:00 2001 From: Toshiyuki Takahashi Date: Sun, 30 Jun 2024 14:39:34 +0900 Subject: [PATCH] Add a configuration to publish from GitHub Actions --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d2ad059 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - '*.*.*' + +jobs: + releases: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 + with: + java-version: 8 + distribution: adopt + - uses: coursier/cache-action@v6 + - name: Setup GPG + run: | + echo "$GPG_PRIVATE_KEY" | gpg --import + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + + - name: Publish to Sonatype + env: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: sbt clean +test publishSigned sonatypeRelease \ No newline at end of file