File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change
1
+ # assumes $INPUT_VERSION is set to the selected release version
2
+ CURRENT_VERSION=$( echo " $( cat DESCRIPTION) " | grep " Version:" | awk ' {print $2}' )
3
+
4
+ if [ " $( printf ' %s\n' " $INPUT_VERSION " " $CURRENT_VERSION " | sort -V | head -n1) " = " $INPUT_VERSION " ]; then
5
+ echo " ::error title=Invalid version::Provided version number must be higher than the current version ($CURRENT_VERSION )."
6
+ exit 1
7
+ fi
Original file line number Diff line number Diff line change 1
1
2
2
name : release
3
- run-name : Release usmap ${{ inputs.version }}
3
+ run-name : Release ${{ github.event.repository.name }} ${{ inputs.version }}
4
4
5
5
on :
6
6
workflow_dispatch :
21
21
- name : Check version number
22
22
env :
23
23
INPUT_VERSION : ${{ inputs.version }}
24
- run : |
25
- CURRENT_VERSION=$(echo "$(cat DESCRIPTION)" | grep "Version:" | awk '{print $2}')
26
-
27
- if [ "$(printf '%s\n' "$INPUT_VERSION" "$CURRENT_VERSION" | sort -V | head -n1)" = "$INPUT_VERSION" ]; then
28
- echo "::error title=Invalid version::Provided version number must be higher than the current version ($CURRENT_VERSION)."
29
- exit 1
30
- fi
24
+ run : .github/workflow-resources/release-version-check.sh
31
25
32
26
- name : Setup R
33
27
uses : r-lib/actions/setup-r@v2
58
52
uses : jacobtomlinson/gha-find-replace@v3
59
53
with :
60
54
find : " [unreleased]"
61
- replace : " usmap ${{ inputs.version }}"
55
+ replace : " ${{ github.event.repository.name }} ${{ inputs.version }}"
62
56
include : " NEWS.md"
63
57
regex : false
64
58
You can’t perform that action at this time.
0 commit comments