From cf2839865ffbce0e83025f46462c26c54c858f3c Mon Sep 17 00:00:00 2001 From: Dmitry Fedosov Date: Thu, 26 Dec 2024 22:22:09 -0500 Subject: [PATCH] Set release version dynamically --- .github/workflows/ci-release.yml | 4 ++++ version.sbt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-release.yml b/.github/workflows/ci-release.yml index 77d315b..52a0762 100644 --- a/.github/workflows/ci-release.yml +++ b/.github/workflows/ci-release.yml @@ -10,6 +10,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Extract Git Tag + id: extract_tag + run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV - uses: actions/setup-java@v4 with: distribution: temurin @@ -18,6 +21,7 @@ jobs: - uses: sbt/setup-sbt@v1 - run: sbt ci-release env: + VERSION: ${{ env.VERSION }} PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} diff --git a/version.sbt b/version.sbt index b4d9d23..6e5e8db 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -ThisBuild / version := "0.41.5-SNAPSHOT" +ThisBuild / version := sys.env("VERSION")