From 0e8d6d95426640f8b3ead3e8ed2aa38618e14337 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 22 Jun 2024 13:15:18 +0200 Subject: [PATCH] Fixed environment variable access --- .github/workflows/build-and-release.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 9da10512..30fb363a 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -48,26 +48,26 @@ jobs: - name: Check tag vs. metadata version run: | # Ensure, that the tag matches the version in the metadata file: - if [ "${GITHUB_REF}" != "refs/tags/${formatted_version}" ]; then - echo "Tag '${GITHUB_REF}' does not match the version in the metadata file '${formatted_version}'" + if [ "${GITHUB_REF}" != "refs/tags/${env.FORMATTED_VERSION}" ]; then + echo "Tag '${GITHUB_REF}' does not match the version in the metadata file '${env.FORMATTED_VERSION}'" exit 1 else - echo "Tag '${GITHUB_REF}' matches the version in the metadata file '${formatted_version}'" + echo "Tag '${GITHUB_REF}' matches the version in the metadata file '${env.FORMATTED_VERSION}'" fi - name: Read changelog id: read_changelog run: | # Ensure, that the matching changelog file for the current version exists: - if [ ! -f "app/MindWork AI Studio/wwwroot/changelog/${FORMATTED_VERSION}.md" ]; then - echo "Changelog file 'app/MindWork AI Studio/wwwroot/changelog/${FORMATTED_VERSION}.md' not found" + if [ ! -f "app/MindWork AI Studio/wwwroot/changelog/${env.FORMATTED_VERSION}.md" ]; then + echo "Changelog file 'app/MindWork AI Studio/wwwroot/changelog/${env.FORMATTED_VERSION}.md' not found" exit 1 else - echo "Changelog file '${FORMATTED_VERSION}.md' found" + echo "Changelog file '${env.FORMATTED_VERSION}.md' found" fi # Read the changelog file: - changelog=$(cat "app/MindWork AI Studio/wwwroot/changelog/${FORMATTED_VERSION}.md") + changelog=$(cat "app/MindWork AI Studio/wwwroot/changelog/${env.FORMATTED_VERSION}.md") # Set the output: echo "changelog<> "$GITHUB_OUTPUT" @@ -752,6 +752,7 @@ jobs: retention-days: ${{ env.RETENTION_RELEASE_ASSETS }} publish_release: + name: Publish release runs-on: ubuntu-latest needs: create_release env: