File tree Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Expand file tree Collapse file tree 2 files changed +18
-18
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1717 run : pip install -U packaging
1818 - name : Get versions
1919 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+
2138 - name : Push Tags Version
2239 if : steps.get_versions.outputs.original_tag_name != ''
2340 env :
You can’t perform that action at this time.
0 commit comments