From 1606c9b6dd23ca98747cf891239ca19b9831d8ce Mon Sep 17 00:00:00 2001 From: Max P Date: Wed, 14 Aug 2024 21:43:38 +0200 Subject: [PATCH] Refine create_temp_branch logic in release workflow Switched `git reset --hard` to `git rm -rf .` followed by a target-specific `git reset` in the release workflow. This change ensures only the necessary files (README.md, package.json, LICENSE, dist/**) are retained for the temp release branch, improving the accuracy of release preparation. --- .github/workflows/CreateRelease.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index ec78ec7..2af9662 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -76,9 +76,10 @@ jobs: id: create_temp_branch run: | git checkout --orphan temp_branch - git reset --hard + git rm -rf . + git reset -- README.md package.json LICENSE dist/** git add README.md package.json LICENSE dist/** - git commit -m "Prepare files for release ${env.VERSION}" + git commit -m "Prepare files for release ${{ env.VERSION }}" shell: bash - name: Create and push tag