From 2c9e4c5ff9d2b752797c3e2d7dcc5c8912d7ed6c Mon Sep 17 00:00:00 2001 From: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com> Date: Fri, 24 Feb 2023 14:29:42 +0100 Subject: [PATCH] Remove unnecessary operations in minor_version_release.yml (#4267) --- .github/workflows/minor_version_release.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/minor_version_release.yml b/.github/workflows/minor_version_release.yml index e776d87ff..18390352c 100644 --- a/.github/workflows/minor_version_release.yml +++ b/.github/workflows/minor_version_release.yml @@ -18,7 +18,7 @@ jobs: shell: bash # We only need `major.minor` in Readme so we cut the full version string to the first two tokens run: | - echo "current_release_minor=$(cat VERSION.txt | cut -d "." -f 1,2)" >> $GITHUB_OUTPUT + echo "current_release_minor=$(cut -d "." -f 1,2 < VERSION.txt)" >> "$GITHUB_OUTPUT" - name: Create new version branch run: | @@ -33,15 +33,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git checkout main - cat VERSION.txt | awk -F. '/[0-9]+\./{$2++;print}' OFS=. | tee VERSION.txt + NEW_VERSION=$(awk -F. '/[0-9]+\./{$2++;print}' OFS=. < VERSION.txt) + echo "$NEW_VERSION" > VERSION.txt cat VERSION.txt - pip install --upgrade pip - pip install .[all] - pip install ./rest_api - python .github/utils/generate_openapi_specs.py git checkout -b bump-version git add . - git commit -m "Update unstable version and openapi schema" + git commit -m "Update unstable version" git push -u origin bump-version gh pr create -B main -H bump-version --title 'Bump unstable version' --body 'Part of the release process' --label 'ignore-for-release-notes'