Skip to content

Commit

Permalink
Use 'shell : python' instead of script
Browse files Browse the repository at this point in the history
  • Loading branch information
s-weigand committed Nov 3, 2020
1 parent e34653e commit b78d2e9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/publish-major-minor.py

This file was deleted.

19 changes: 18 additions & 1 deletion .github/workflows/publish-major-minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,24 @@ jobs:
run: pip install -U packaging
- name: Get versions
id: get_versions
run: python .github/workflows/publish-major-minor.py ${{ github.ref }}
shell: python
run: |
import sys
from packaging.version import parse
print(sys.version_info)
tag_ref = "${{ github.ref }}"
tag_name = tag_ref.split("/")[-1]
print(f"tag_name: {tag_name}")
version = parse(tag_name)
print(f"version: {version}")
if not (version.is_prerelease):
print("Creating new major and minor tags!")
print(f"::set-output name=original_tag_name::{tag_name}")
print(f"::set-output name=major_version::v{version.major}")
print(f"::set-output name=minor_version::v{version.major}.{version.minor}")
else:
print("No tags created (dev or pre version)!")
- name: Push Tags Version
if: steps.get_versions.outputs.original_tag_name != ''
env:
Expand Down

0 comments on commit b78d2e9

Please sign in to comment.