Skip to content

Commit

Permalink
Create publish-release.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Aleksandar Stanchev <[email protected]>
  • Loading branch information
alstanchev authored Jan 6, 2025
1 parent ce1af09 commit f40c731
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Publish release
run-name: Publish release ${{ github.event.inputs.release }}

on:
workflow_dispatch:
inputs:
release:
description: 'Publishes release version'
required: true
type: string

jobs:
publish-artifacts:
runs-on: ubuntu-20.04
if: github.event.inputs.release && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Import GPG key
run: |
echo "${{ secrets.PGP_SECRET }}" | gpg --batch --import
env:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: temurin
cache: sbt

- name: Build project
run: ./build.sh

- name: Publish Signed Artifacts
run: sbt +publishSigned
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

0 comments on commit f40c731

Please sign in to comment.