From 49a4f51886139ea7f45cbcfb8f576db9f70dd126 Mon Sep 17 00:00:00 2001 From: ch4r10t33r Date: Thu, 9 Oct 2025 17:39:38 +0100 Subject: [PATCH] fix: Updates to GH workflows to use PAT_TOKEN --- .github/workflows/auto-release.yml | 54 ++++++++++-------------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index cde6ce9..4a8fc8e 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -444,11 +444,11 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - pull-requests: write steps: - name: Checkout code uses: actions/checkout@v4 with: + token: ${{ secrets.PAT_TOKEN }} ref: ${{ github.ref_name }} fetch-depth: 0 @@ -464,39 +464,19 @@ jobs: echo "✅ Updated version to $VERSION" - - name: Create Pull Request for version update - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: "chore: bump version to ${{ needs.determine-release.outputs.new_version }}" - branch: "release/version-${{ needs.determine-release.outputs.new_version }}" - delete-branch: true - base: master - title: "chore: bump version to ${{ needs.determine-release.outputs.new_version }}" - body: | - 🤖 **Automated version bump** - - This PR updates the version to `${{ needs.determine-release.outputs.new_version }}` following the release. - - ## Changes - - Updated `build.zig.zon` version - - Updated `VERSION` file - - ## Release - - Release: [${{ needs.determine-release.outputs.new_version }}](https://github.com/${{ github.repository }}/releases/tag/${{ needs.determine-release.outputs.new_version }}) - - ## Instructions - This PR was automatically created and can be merged to sync version files. - - To enable auto-merge for future version PRs: - 1. Go to Settings → General → Pull Requests - 2. Enable "Allow auto-merge" - - --- - - _This PR can be safely merged or closed if you prefer manual version management._ - labels: | - automated - release - chore - assignees: ${{ github.actor }} + - name: Commit and push version update + run: | + NEW_VERSION="${{ needs.determine-release.outputs.new_version }}" + + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git add build.zig.zon VERSION + + if git diff --staged --quiet; then + echo "â„šī¸ No changes to commit" + else + git commit -m "chore: bump version to $NEW_VERSION [skip ci]" + git push origin HEAD:${{ github.ref_name }} + echo "✅ Pushed version update to ${{ github.ref_name }}" + fi