-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (40 loc) · 1.14 KB
/
pr-version.yaml
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
name: On PR
on:
pull_request:
branches:
- main
paths-ignore:
- LICENSE
- README.md
- .flake8
- .github/**
- .gitignore
- .markdownlint.yaml
- .pre-commit-config.yaml
- .shellcheckrc
jobs:
lint:
name: Version
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get versions
id: get
run: |
echo "last_tag=$(git tag --sort=creatordate --sort=v:refname | tail -n1)" >> $GITHUB_OUTPUT
echo "plugin_version=$(grep -Po '(?<=version:\ ).*' plugin.yaml)" >> $GITHUB_OUTPUT
- name: Compare versions
uses: madhead/[email protected]
id: version
with:
version: ${{ steps.get.outputs.last_tag }}
compare-to: ${{ steps.get.outputs.plugin_version }}
- name: Check if the plugin.yaml version was updated
run: |-
if [[ '${{ steps.version.outputs.comparison-result }}' != '<' ]]; then
echo '::error::Version in the file plugin.yaml was not updated!'
exit 1
fi