| 1 |
name: Generate release pull request |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
|
| 6 |
permissions: |
| 7 |
contents: write |
| 8 |
pull-requests: write |
| 9 |
|
| 10 |
jobs: |
| 11 |
generate-pr: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- name: Checkout |
| 15 |
uses: actions/checkout@v7 |
| 16 |
|
| 17 |
- name: Setup Go |
| 18 |
uses: actions/setup-go@v7 |
| 19 |
with: |
| 20 |
go-version-file: 'go.mod' |
| 21 |
|
| 22 |
- name: Batch and merge |
| 23 |
run: | |
| 24 |
go run main.go gen |
| 25 |
go run main.go batch auto |
| 26 |
go run main.go merge |
| 27 |
echo RELEASE_VERSION=$(go run main.go latest) >> $GITHUB_ENV |
| 28 |
tail -n +3 .changes/$(go run main.go latest).md > ${{ github.workspace }}/rel_notes.md |
| 29 |
|
| 30 |
- name: Create Pull Request |
| 31 |
uses: peter-evans/create-pull-request@v8 |
| 32 |
with: |
| 33 |
add-paths: | |
| 34 |
.changes/ |
| 35 |
docs/ |
| 36 |
CHANGELOG.md |
| 37 |
package.json |
| 38 |
title: Release ${{ env.RELEASE_VERSION }} |
| 39 |
branch: release/${{ env.RELEASE_VERSION }} |
| 40 |
commit-message: 'Release ${{ env.RELEASE_VERSION }}' |
| 41 |
body-path: '${{ github.workspace }}/rel_notes.md' |