@@ -19,45 +19,23 @@ jobs:
1919 - uses : actions/checkout@v4
2020 with :
2121 ref : ' refs/heads/develop'
22- - uses : actions/setup-python@v4
22+ - uses : actions/setup-python@v5
2323 with :
2424 python-version : ' 3.10'
25+
2526 - name : Install Poetry
26- uses : abatilo/actions-poetry@v2.0.0
27+ uses : abatilo/actions-poetry@v3
2728 with :
28- poetry-version : 1.3.2
29+ poetry-version : 1.8.5
30+
2931 - name : Bump minor version
30- env :
31- COMMIT_VERSION : ${{ github.ref }}
3232 run : |
33-
34- # only update the develop branch if were making #.#.0 release
35- # Get the branch name from the GITHUB_REF environment variable
36- branch_name=${GITHUB_REF#refs/heads/}
37-
38- # Extract the last number in the branch name using a regular expression
39- if [[ $branch_name =~ /([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
40-
41- first_number=${BASH_REMATCH[1]}
42- middle_number=${BASH_REMATCH[2]}
43- last_number=${BASH_REMATCH[3]}
44-
45- # Increment the middle number by 1
46- incremented_middle_number=$((middle_number + 1))
47-
48- # Check if the last number is '0'
49- if [ "$last_number" == "0" ]; then
50-
51- update_version=$first_number.$incremented_middle_number.$last_number-alpha.1
52-
53- poetry version $update_version
54- echo "software_version=$update_version" >> $GITHUB_ENV
55-
56- git config --global user.name 'podaac-tig bot'
57- git config --global user.email 'podaac-tig@noreply.github.com'
58- git commit -am "/version ${{ env.software_version }}"
59- git push
60-
61- fi
62-
63- fi
33+ poetry version ${GITHUB_REF#refs/heads/release/}
34+ poetry version preminor
35+ echo "software_version=$(poetry version | awk '{print $2}')" >> $GITHUB_ENV
36+ - name : Commit Version Bump
37+ run : |
38+ git config --global user.name 'podaac-tig bot'
39+ git config --global user.email 'podaac-tig@noreply.github.com'
40+ git commit -am "/version ${{ env.software_version }}"
41+ git push
0 commit comments