-
Notifications
You must be signed in to change notification settings - Fork 17
46 lines (39 loc) · 1.61 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release package
on:
workflow_run:
workflows: [Run Tests]
types: [completed]
branches: [master]
permissions:
contents: write
pull-requests: write
jobs:
release-if-needed:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Create Release PR
uses: googleapis/release-please-action@v4
id: release
with:
release-type: php
- name: Checkout
if: ${{ steps.release.outputs.prs_created == 'true' }}
uses: actions/checkout@v4
with:
ref: ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
- name: Job Summary
if: ${{ steps.release.outputs.prs_created == 'true' }}
run: |
echo "Release PR created with the following outputs:" >> $GITHUB_STEP_SUMMARY
echo "${{ toJSON(steps.release.outputs) }}" >> $GITHUB_STEP_SUMMARY
- name: Update version in HoneybadgerLaravel.php
if: ${{ steps.release.outputs.prs_created == 'true' }}
run: php scripts/SyncSourceCodeWithPackageVersion.php ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
- uses: stefanzweifel/git-auto-commit-action@v5
if: ${{ steps.release.outputs.prs_created == 'true' }}
with:
create_branch: false
commit_message: "chore: update version to ${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} [skip ci]"
commit_user_name: "honeybadger-robot"
commit_user_email: "[email protected]"