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:
5
.github/workflows/CreateRelease.yml
vendored
5
.github/workflows/CreateRelease.yml
vendored
@@ -76,9 +76,10 @@ jobs:
|
|||||||
id: create_temp_branch
|
id: create_temp_branch
|
||||||
run: |
|
run: |
|
||||||
git checkout --orphan temp_branch
|
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 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
|
shell: bash
|
||||||
|
|
||||||
- name: Create and push tag
|
- name: Create and push tag
|
||||||
|
Reference in New Issue
Block a user