File tree 2 files changed +18
-18
lines changed 2 files changed +18
-18
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 17
17
run : pip install -U packaging
18
18
- name : Get versions
19
19
id : get_versions
20
- run : python .github/workflows/publish-major-minor.py ${{ github.ref }}
20
+ shell : python
21
+ run : |
22
+ import sys
23
+ from packaging.version import parse
24
+ print(sys.version_info)
25
+ tag_ref = "${{ github.ref }}"
26
+ tag_name = tag_ref.split("/")[-1]
27
+ print(f"tag_name: {tag_name}")
28
+ version = parse(tag_name)
29
+ print(f"version: {version}")
30
+ if not (version.is_prerelease):
31
+ print("Creating new major and minor tags!")
32
+ print(f"::set-output name=original_tag_name::{tag_name}")
33
+ print(f"::set-output name=major_version::v{version.major}")
34
+ print(f"::set-output name=minor_version::v{version.major}.{version.minor}")
35
+ else:
36
+ print("No tags created (dev or pre version)!")
37
+
21
38
- name : Push Tags Version
22
39
if : steps.get_versions.outputs.original_tag_name != ''
23
40
env :
You can’t perform that action at this time.
0 commit comments