Skip to content

Commit b1b2820

Browse files
committed
no message
1 parent 041bdbc commit b1b2820

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/release-management.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -197,19 +197,8 @@ jobs:
197197
# This ensures it's available even if the temporary directory is cleaned up
198198
cp /tmp/release-notes/release_notes.md $GITHUB_WORKSPACE/release_notes.md
199199
200-
- name: Commit changes to develop
201-
if: github.event_name != 'pull_request_target'
202-
uses: stefanzweifel/git-auto-commit-action@v4
203-
with:
204-
commit_message: "release: prepare v${{ steps.version_bump.outputs.version }}"
205-
file_pattern: "*.php *.md *.txt package.json"
206-
# For manual/scheduled events, commit to the specified target branch or develop
207-
branch: ${{ github.event.inputs.target_branch || 'develop' }}
208-
env:
209-
GITHUB_TOKEN: ${{ secrets.REPO_PAT }}
210-
211200
- name: Commit changes to main
212-
if: github.event_name == 'pull_request_target'
201+
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
213202
run: |
214203
git config --global user.name "GitHub Actions"
215204
git config --global user.email "[email protected]"
@@ -225,7 +214,7 @@ jobs:
225214
fi
226215
227216
- name: Create and push tag
228-
if: github.event_name == 'pull_request_target'
217+
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
229218
run: |
230219
git config --global user.name "GitHub Actions"
231220
git config --global user.email "[email protected]"
@@ -242,7 +231,7 @@ jobs:
242231
fi
243232
244233
- name: Create GitHub Release
245-
if: github.event_name == 'pull_request_target'
234+
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
246235
uses: actions/create-release@v1
247236
id: create_release
248237
continue-on-error: true
@@ -256,7 +245,7 @@ jobs:
256245
prerelease: false
257246

258247
- name: Handle release creation failure
259-
if: github.event_name == 'pull_request_target' && steps.create_release.outcome == 'failure'
248+
if: (github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch') && steps.create_release.outcome == 'failure'
260249
run: |
261250
echo "Failed to create release. This could be because the tag already exists."
262251
echo "Checking if release exists..."
@@ -361,7 +350,7 @@ jobs:
361350
fi
362351
363352
- name: Delete processed changesets
364-
if: github.event_name == 'pull_request_target'
353+
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
365354
run: |
366355
# Configure Git
367356
git config --global user.name "GitHub Actions"
@@ -400,7 +389,7 @@ jobs:
400389
fi
401390
402391
- name: Update develop branch
403-
if: github.event_name == 'pull_request_target'
392+
if: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch'
404393
run: |
405394
# Configure Git
406395
git config --global user.name "GitHub Actions"
@@ -419,4 +408,15 @@ jobs:
419408
# Push changes to develop
420409
git push origin develop
421410
422-
echo "Successfully synced main back to develop branch"
411+
echo "Successfully synced main back to develop branch"
412+
413+
- name: Commit changes to develop
414+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
415+
uses: stefanzweifel/git-auto-commit-action@v4
416+
with:
417+
commit_message: "release: prepare v${{ steps.version_bump.outputs.version }}"
418+
file_pattern: "*.php *.md *.txt package.json"
419+
# For manual/scheduled events, commit to the specified target branch or develop
420+
branch: ${{ github.event.inputs.target_branch || 'develop' }}
421+
env:
422+
GITHUB_TOKEN: ${{ secrets.REPO_PAT }}

0 commit comments

Comments
 (0)