-
-
Notifications
You must be signed in to change notification settings - Fork 203
53 lines (44 loc) · 1.42 KB
/
check-semver.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
47
48
49
50
51
52
53
name: Check Semver
# on:
# pull_request:
# branches:
# - main
on: workflow_dispatch
jobs:
check-semver:
name: Check semver
runs-on: ubuntu-latest
outputs:
error_message: ${{ steps.check_semver.outputs.error_message }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run cargo-semver-checks
id: check_semver
uses: orhun/cargo-semver-checks-action@feat/add_action_output
comment-on-pr:
name: Comment on pull request
runs-on: ubuntu-latest
needs: check-semver
if: always()
permissions:
pull-requests: write
steps:
- name: Comment
if: ${{ needs.check-semver.outputs.error_message != null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-semver-check-error
message: |
Thank you for opening this pull request!
Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes made since the last release.
Details:
```
${{ needs.check-semver.outputs.error_message }}
```
- name: Delete comment
if: ${{ needs.check-semver.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-semver-check-error
delete: true