@@ -19,45 +19,23 @@ jobs:
19
19
- uses : actions/checkout@v4
20
20
with :
21
21
ref : ' refs/heads/develop'
22
- - uses : actions/setup-python@v4
22
+ - uses : actions/setup-python@v5
23
23
with :
24
24
python-version : ' 3.10'
25
+
25
26
- name : Install Poetry
26
- uses : abatilo/actions-poetry@v2.0.0
27
+ uses : abatilo/actions-poetry@v3
27
28
with :
28
- poetry-version : 1.3.2
29
+ poetry-version : 1.8.5
30
+
29
31
- name : Bump minor version
30
- env :
31
- COMMIT_VERSION : ${{ github.ref }}
32
32
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