-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 934 Bytes
/
version.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
name: Ensure version has been updated
on:
pull_request:
branches: master
jobs:
check-version:
name: Package version updated
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: actions/checkout@v4
with:
submodules: recursive
- id: new-version
run: |
echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.base_ref }}
- id: target-version
run: |
echo "version=$(python setup.py --version)" >> "$GITHUB_OUTPUT"
- env:
NEW_VERSION: ${{ steps.new-version.outputs.version }}
TARGET_VERSION: ${{ steps.target-version.outputs.version }}
run: |
! (printf '%s\n' "$NEW_VERSION" "$TARGET_VERSION" | sort -C -V)