T0 Release #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 '[email protected]' | |
- 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 }} | |
- name: Create Release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.T0_GH_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: Release ${{ env.VERSION }} | |
draft: false | |
prerelease: false |