-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
39 lines (34 loc) · 1.45 KB
/
action.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
name: Create pull request
inputs:
next_version:
required: true
notes:
required: true
previous_version:
required: true
release:
required: true
runs:
using: "composite"
steps:
- run: |
echo -e "# Changelog\n" > NEXT.md
echo -e "All notable changes to this project will be documented in this file. See [standard-version](${{ github.server_url }}/conventional-changelog/standard-version) for commit guidelines.\n" >> NEXT.md
echo -e "${{ inputs.release == 'patch' && '###' || '##' }} [${{ inputs.next_version }}](${{ github.server_url }}/${{ github.repository }}/compare/${{ inputs.previous_version }}...v${{ inputs.next_version }}) ($(date +'%Y-%m-%d'))\n" >> NEXT.md
echo -e "${{ inputs.notes }}\n" >> NEXT.md
cat CHANGELOG.md | sed -e '1,4d' >> NEXT.md && mv NEXT.md CHANGELOG.md
shell: bash
- id: commit
uses: pr-mpt/actions-commit-hash@v3
- uses: peter-evans/create-pull-request@v6
with:
title: Release ${{ inputs.next_version }}
body: |
## Release [${{ inputs.next_version }}](${{ github.server_url }}/${{ github.repository }}/compare/${{ inputs.previous_version }}...${{ steps.commit.outputs.short }})
${{ inputs.notes }}
author: GitHub <noreply@github.com>
branch: release
committer: GitHub <noreply@github.com>
commit-message: |
chore(release): ${{ inputs.next_version }}
delete-branch: true