From a4792833be32bbbca09eb4ce0b9bbd763bb6f452 Mon Sep 17 00:00:00 2001 From: Max P Date: Fri, 16 Aug 2024 18:12:34 +0200 Subject: [PATCH] Optimize release workflow: remove temp branch steps Simplified the workflow by eliminating the creation and usage of a temporary branch for releasing. Changes are now directly committed and pushed to the release branch, streamlining the process and reducing complexity. --- .github/workflows/CreateRelease.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 3877ca0..fbb9fc0 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -94,29 +94,12 @@ jobs: id: create_temp_branch if: steps.check_version.outputs.skip_release == 'false' run: | - # Create a temporary branch to commit the changes - git checkout -b temp-release-branch - - # Remove unwanted files - rm -rf .gitignore package-lock.json - - # 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 }}" - - # Checkout the release branch git checkout release - - # Merge the changes from the temporary branch into the release branch - git merge --no-ff temp-release-branch - - # Push the changes to the release branch + git reset + rm -f .gitignore + git add README.md package.json LICENSE dist/ src/ tsconfig.json + git commit -m "Prepare files for release ${{ env.VERSION }}" git push origin release - - # Delete the temporary branch - git branch -d temp-release-branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash