diff --git a/.github/workflows/create_tag.yaml b/.github/workflows/create_tag.yaml new file mode 100644 index 000000000..b53f6dce4 --- /dev/null +++ b/.github/workflows/create_tag.yaml @@ -0,0 +1,34 @@ +name: Tag and Release on Version Change + +on: + push: + paths: + - 'src/python/T0/__init__.py' + +jobs: + create_tag_and_release: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Git + run: | + git config --global user.name 'github-actions' + git config --global user.email 'github-actions@github.com' + + - name: Extract Version + id: extract_version + run: | + echo "import sys; sys.path.insert(0, 'src/python'); from T0 import __version__; print(__version__)" > get_version.py + VERSION=$(python get_version.py) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create Tag + run: | + git tag ${{ env.VERSION }} + git push origin ${{ env.VERSION }} + + + diff --git a/src/python/T0/__init__.py b/src/python/T0/__init__.py index 0f3fec29b..d6659c2f9 100644 --- a/src/python/T0/__init__.py +++ b/src/python/T0/__init__.py @@ -1,7 +1,7 @@ """ _T0_ -Core libraries for Workload Management Packages +Core libraries for Workload Management Packages. """ __version__ = '3.2.3'