Add GitHub token for secure push in release workflow

Configured the GitHub Actions workflow to include the GITHUB_TOKEN environment variable during the release process. This ensures secure authentication when pushing changes to the release branch. Additionally, reordered the checkout and commit commands for better sequencing.
This commit is contained in:
2024-08-16 17:59:52 +02:00
parent 49490f2647
commit 372244d5c4

View File

@@ -94,17 +94,19 @@ 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
# Add new/modified files # Add new/modified files
git add README.md package.json LICENSE dist/ src/ tsconfig.json git add README.md package.json LICENSE dist/ src/ tsconfig.json
# 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
- name: Create and push tag - name: Create and push tag