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.
This commit is contained in:
2024-08-16 18:12:34 +02:00
parent a2638420e8
commit a4792833be

View File

@@ -94,29 +94,12 @@ 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: |
# 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 git checkout release
git reset
# Merge the changes from the temporary branch into the release branch rm -f .gitignore
git merge --no-ff temp-release-branch git add README.md package.json LICENSE dist/ src/ tsconfig.json
git commit -m "Prepare files for release ${{ env.VERSION }}"
# Push the changes to the release branch
git push origin release git push origin release
# Delete the temporary branch
git branch -d temp-release-branch
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash