From 4a6ed8a15ee98266139f3fe33f826b11aa18d266 Mon Sep 17 00:00:00 2001 From: Artem IG Date: Thu, 20 Oct 2022 19:40:05 +0300 Subject: [PATCH 1/4] upd --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0c7dc44..681e2a5 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,10 +90,33 @@ jobs: - name: Build uber jar run: ./gradlew uberJar - name: Run tests - run: python src/test/python/test_uber.py + run: python src/test/python/test_uber.py + + version-test: + needs: [ unit-test, python-test ] + runs-on: ubuntu-latest + steps: + # prevents pushing newer code with an already published version + - name: Setup JDK + uses: actions/setup-java@master + with: + java-version: 17 + distribution: 'temurin' + cache: gradle + - name: Get the project version + id: get_version + run: | + git fetch --all --tags + VERSION=$(./gradlew properties | grep version | awk '{print $2}') + echo "Version $VERSION" + + [[ -z $(git tag -l $VERSION) ]] # check this version was not published + + echo "result=$VERSION" >>$GITHUB_OUTPUT + to-staging: - needs: [unit-test, python-test] + needs: [unit-test, python-test, version-test] runs-on: ubuntu-latest steps: - uses: actions/checkout@master From f5db8a87667a23c02a302dee7f57c884b887c697 Mon Sep 17 00:00:00 2001 From: Artem IG Date: Thu, 20 Oct 2022 19:40:37 +0300 Subject: [PATCH 2/4] upd --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 681e2a5..431c4d9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -93,7 +93,6 @@ jobs: run: python src/test/python/test_uber.py version-test: - needs: [ unit-test, python-test ] runs-on: ubuntu-latest steps: # prevents pushing newer code with an already published version From a07be21147736769d6c3d11940eff0bb81ac7c2c Mon Sep 17 00:00:00 2001 From: Artem IG Date: Thu, 20 Oct 2022 19:41:45 +0300 Subject: [PATCH 3/4] upd --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 431c4d9..cc05b08 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -93,9 +93,10 @@ jobs: run: python src/test/python/test_uber.py version-test: + # prevents pushing newer code with an already published version runs-on: ubuntu-latest steps: - # prevents pushing newer code with an already published version + - uses: actions/checkout@master - name: Setup JDK uses: actions/setup-java@master with: From c1a27f868b194e67fa4a99590a6aa004c8fe8775 Mon Sep 17 00:00:00 2001 From: Artem IG Date: Thu, 20 Oct 2022 19:43:34 +0300 Subject: [PATCH 4/4] !!master --- .github/workflows/ci.yaml | 1 - build.gradle.kts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc05b08..83bd178 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -114,7 +114,6 @@ jobs: echo "result=$VERSION" >>$GITHUB_OUTPUT - to-staging: needs: [unit-test, python-test, version-test] runs-on: ubuntu-latest diff --git a/build.gradle.kts b/build.gradle.kts index 1099018..27f8403 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,7 +9,7 @@ plugins { } group = "io.github.rtmigo" -version = "0.1.1" +version = "0.1.2-SNAPSHOT" repositories { mavenCentral()