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.
This commit is contained in:
2024-08-14 21:43:38 +02:00
parent 3c308635dd
commit 1606c9b6dd

View File

@@ -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