-
-
Notifications
You must be signed in to change notification settings - Fork 18
37 lines (34 loc) · 1.01 KB
/
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
---
name: Version check 🏁
on:
push:
branches:
- main
- pre-release
pull_request:
branches:
- main
- pre-release
workflow_call:
jobs:
version-check:
name: Version check 🏁
runs-on: ubuntu-latest
if: "! contains(github.event.commits[0].message, '[skip version]')"
steps:
- name: Checkout repo 🛎
uses: actions/checkout@v2
- name: NEWS.md and DESCRIPTION Version check 🏁
run: |
DESC_VERSION=$(awk -F: '/Version:/{gsub(/[ ]+/,"") ; print $2}' DESCRIPTION)
NEWS_VERSION=$(awk '/^#+ /{print $3; exit}' NEWS.md)
echo "NEWS.md version: $NEWS_VERSION"
echo "DESCRIPTION version: $DESC_VERSION"
if (test $DESC_VERSION = $NEWS_VERSION ); then
echo "NEWS.md and DESCRIPTION have the same version"
else
echo "🙈 NEWS.md and DESCRIPTION have different versions!"
echo "🙏 Please fix this."
exit 1
fi
shell: bash