diff --git a/.github/template_gitref b/.github/template_gitref index d03ba7e1..cd7b2753 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-249-gca8f021 +2021.08.26-250-gf4315cf diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7873a301..85224a88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,6 @@ on: inputs: release: description: "Release tag (e.g. 3.2.1)" - required: true before_script: description: | Bash code to run before bindings and docs are built. This should only be used when re-running @@ -287,9 +286,5 @@ jobs: echo "GH Issues $GH_ISSUES" python .ci/scripts/update_github.py - - name: Tweet - continue-on-error: true - run: python .ci/scripts/tweet.py ${{ github.event.inputs.release }} - - name: Create release on GitHub run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }} diff --git a/.github/workflows/scripts/release.py b/.github/workflows/scripts/release.py index c7b853aa..04d2e0d9 100755 --- a/.github/workflows/scripts/release.py +++ b/.github/workflows/scripts/release.py @@ -10,6 +10,7 @@ import os import textwrap import requests +import subprocess from git import Repo from pathlib import Path @@ -152,14 +153,8 @@ def main(): release_path = os.path.dirname(os.path.abspath(__file__)) plugin_path = release_path.split("/.github")[0] - version = None - with open(f"{plugin_path}/setup.py") as fp: - for line in fp.readlines(): - if "version=" in line: - version = re.split("\"|'", line)[1] - if not version: - raise RuntimeError("Could not detect existing version ... aborting.") - release_version = version.replace(".dev", "") + output = subprocess.check_output(["bump2version", "--dry-run", "--list", "release"]) + release_version = re.findall(r"\nnew_version=([0-9.]*)\n", output.decode())[0] print(f"\n\nRepo path: {plugin_path}") repo = Repo(plugin_path)