-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (44 loc) · 1.22 KB
/
comment_version_on_pr.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: Comment Release Version to PR
on:
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- "**/*.rs"
- "**/Cargo.toml"
- "**/Cargo.lock"
- .github/workflows/comment_version_on_pr.yml
branches:
- "main"
jobs:
comment-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get Next Version
id: version
uses: paulhatch/[email protected]
with:
tag_prefix: "v"
major_pattern: "/feat!:|refactor!:"
major_regexp_flags: "g"
minor_pattern: "/feat:|refactor:"
minor_regexp_flags: "g"
version_format: "${major}.${minor}.${patch}"
bump_each_commit: false
search_commit_body: false
user_format_type: "json"
enable_prerelease_mode: true
- name: Comment on PR with version
uses: mshick/add-pr-comment@v2
with:
message: |
Hey, the version for this pull request will be: ${{ steps.version.outputs.version }}
message-id: pr
reactions: rocket
GITHUB_TOKEN: ${{ secrets.GH_PAT }}