From 9caf12c61dcb24388bc0e0ff1a5e95478edd0ffa Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 17:54:31 +0200 Subject: [PATCH] Enhance release branch update process Refined workflow to ensure smoother updates to the release branch. Added steps to stash and apply local changes to prevent conflicts. Provided specific commands to checkout and update the release branch correctly. This approach maintains the branch's integrity and ensures all modifications are properly committed and pushed. --- .github/workflows/CreateRelease.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 3d64bae..3fe13da 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,11 +94,22 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - git checkout release --no-checkout - git reset - rm -f .gitignore + # Stash current changes (optional, only if you have unstaged changes you want to keep) + git stash + + # Checkout the release branch + git checkout release + + # Apply stashed changes (if you stashed earlier) + git stash pop || true + + # Add new/modified files git add README.md package.json LICENSE dist/ src/ tsconfig.json + + # Commit the changes git commit -m "Prepare files for release ${{ env.VERSION }}" + + # Push the changes to the release branch git push origin release shell: bash