From 89685f556c3a0c3e1cadd884cf6fe23000262e61 Mon Sep 17 00:00:00 2001 From: Seun0925 <166032098+Seun0925@users.noreply.github.com> Date: Mon, 19 Aug 2024 07:50:41 -0500 Subject: [PATCH] Feature/devops build (#5) * feat(maven-build): ci-cd to push to maven central * update secret configuration * update secret configuration * Use sbt in place of maven * remove unnecessary secrets --------- Co-authored-by: Seun Soyinka --- .github/workflows/sbt-build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/sbt-build.yml diff --git a/.github/workflows/sbt-build.yml b/.github/workflows/sbt-build.yml new file mode 100644 index 0000000..39c2b7d --- /dev/null +++ b/.github/workflows/sbt-build.yml @@ -0,0 +1,32 @@ +name: Build & Publish + +on: workflow_dispatch + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup JDK And SBT + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "21" + cache: "sbt" + + - name: Test + run: sbt test + + - name: Publish to Maven Repository + run: sbt ci-release + env: + PGP_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + PGP_SECRET: ${{ secrets.GPG_SECRET }} + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + + - name: Publish to GitHub Packages + run: sbt publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }