From af4c53117a30b0eea1ef74f3329e0bfc6324b049 Mon Sep 17 00:00:00 2001 From: Andrea Di Lisio Date: Thu, 21 Dec 2023 11:44:50 +0100 Subject: [PATCH] fix --- .github/workflows/build-test-coverage.yml | 1 + .github/workflows/release-snapshot.yml | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-coverage.yml b/.github/workflows/build-test-coverage.yml index b09fa4d3..6e447ce2 100644 --- a/.github/workflows/build-test-coverage.yml +++ b/.github/workflows/build-test-coverage.yml @@ -45,6 +45,7 @@ jobs: run: | PROJECT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}') echo "::set-output name=project_version::$PROJECT_VERSION" + #FIXME: this is deprecated. See https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - name: Semantic versioning check run: | if [[ "${{steps.get_project_version.outputs.project_version}}" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then diff --git a/.github/workflows/release-snapshot.yml b/.github/workflows/release-snapshot.yml index f6039538..4c02bc4b 100644 --- a/.github/workflows/release-snapshot.yml +++ b/.github/workflows/release-snapshot.yml @@ -25,7 +25,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - checkout_ref: ${{ inputs.checkout_ref }} + ref: ${{ inputs.checkout_ref }} - name: Setup JDK uses: actions/setup-java@v4 with: @@ -36,11 +36,11 @@ jobs: uses: gradle/wrapper-validation-action@v1 - name: Create Snapshot version run: | - echo "project_version_snapshot=${{inputs.project_version}}-${inputs.checkout_ref##*/}-SNAPSHOT" >> $GITHUB_ENV + echo "project_version_snapshot=${{inputs.project_version}}-${{inputs.checkout_ref##*/}}-SNAPSHOT" >> $GITHUB_ENV echo "Snapshot project version created: ${{env.project_version_snapshot}}" - name: Snapshot version check run: | - SNAPSHOT_VERSION_REGEX="^([0-9]+)\.([0-9]+)\.([0-9]+)-${GITHUB_REF##*/}-SNAPSHOT$"; + SNAPSHOT_VERSION_REGEX="^([0-9]+)\.([0-9]+)\.([0-9]+)-${{inputs.checkout_ref##*/}}-SNAPSHOT$"; if [[ "${{env.project_version_snapshot}}" =~ $SNAPSHOT_VERSION_REGEX ]]; then echo "Project version ${{env.project_version_snapshot}} is valid" else