From b2dfbae1ecc8069a9526eb00c9c9ea6a1b72430f Mon Sep 17 00:00:00 2001 From: Manuel Ruck Date: Tue, 17 Oct 2023 21:46:27 +0200 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=91=B7=20fix=20release=20creating?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Ruck --- .github/workflows/release.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4f29523f9..c19f125b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -127,10 +127,12 @@ jobs: echo "$changelog" echo "{${{ matrix.package }} v$changelog}" >> $GITHUB_STEP_SUMMARY - changelog="${changelog//'%'/'%25'}" - changelog="${changelog//$'\n'/'%0A'}" - changelog="${changelog//$'\r'/'%0D'}" - echo "changelog=$changelog" >> $GITHUB_OUTPUT + + { + echo 'CHANGELOG<> "$GITHUB_ENV" working-directory: ${{ steps.get-directory.outputs.directory }} env: @@ -138,10 +140,11 @@ jobs: - name: Determine next version number if: inputs.releaseVersion == 'auto' + id: determine_next_version run: | nextVersion=`pnpm dlx commit-and-tag-version --path . -t $MATRIX_PACKAGE@v --dry-run | sed -n '/^---$/,/^---$/p' | grep -P -o '(\d+\.)(\d+\.)(\d)' | head -n 1` echo "$nextVersion" - echo "NEXT_VERSION=$nextVersion" >> $GITHUB_ENV + echo "NEXT_VERSION=$nextVersion" >> $GITHUB_OUTPUT working-directory: ${{ steps.get-directory.outputs.directory }} env: MATRIX_PACKAGE: ${{ matrix.package }} @@ -192,9 +195,10 @@ jobs: if: inputs.dryRun == false env: GITHUB_TOKEN: ${{ secrets.PAT }} # # use PAT to being able to push to protected branch later on + CHANGELOG: ${{ steps.get_changelog.outputs.CHANGELOG }} with: - tag: $NEXT_VERSION - name: $NEXT_VERSION + tag: ${{ steps.determine_next_version.outputs.NEXT_VERSION }} + name: ${{ steps.determine_next_version.outputs.NEXT_VERSION }} prerelease: true body: | - ${{ steps.get_changelog.outputs.changelog }} + ${{ env.CHANGELOG }}