Move checkout and cleanup steps in release workflow
Reordered steps in the release workflow to checkout the release branch and remove unwanted files before staging changes. This change ensures that the files removed reflect the current state of the release branch, avoiding potential inconsistencies during the release process.
This commit is contained in:
7
.github/workflows/CreateRelease.yml
vendored
7
.github/workflows/CreateRelease.yml
vendored
@@ -94,6 +94,10 @@ jobs:
|
|||||||
id: create_temp_branch
|
id: create_temp_branch
|
||||||
if: steps.check_version.outputs.skip_release == 'false'
|
if: steps.check_version.outputs.skip_release == 'false'
|
||||||
run: |
|
run: |
|
||||||
|
# Checkout the release branch
|
||||||
|
git checkout release
|
||||||
|
|
||||||
|
# Remove unwanted files
|
||||||
rm -rf .gitignore package-lock.json
|
rm -rf .gitignore package-lock.json
|
||||||
|
|
||||||
# Add new/modified files
|
# Add new/modified files
|
||||||
@@ -102,9 +106,6 @@ jobs:
|
|||||||
# Commit the changes
|
# Commit the changes
|
||||||
git commit -m "Prepare files for release ${{ env.VERSION }}"
|
git commit -m "Prepare files for release ${{ env.VERSION }}"
|
||||||
|
|
||||||
# Checkout the release branch
|
|
||||||
git checkout release
|
|
||||||
|
|
||||||
# Push the changes to the release branch
|
# Push the changes to the release branch
|
||||||
git push origin release
|
git push origin release
|
||||||
env:
|
env:
|
||||||
|
Reference in New Issue
Block a user