diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 2f7b38e..feeb4a1 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -8,6 +8,11 @@ defaults: run: shell: bash +env: + # regexr.com/7mmq7 + TAG_REGEX: '^v(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))((a|b|rc)(0|[1-9][0-9]*))?(\.(dev|post)(0|[1-9][0-9]*))?$' + DEV_TAG_REGEX: '\.(dev|post)(0|[1-9][0-9]*)$' + jobs: test: @@ -78,9 +83,8 @@ jobs: id: validate run: | - # regexr.com/7mmq7 - TAG_REGEX='^v(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))((a|b|rc)[1-9][0-9]+)?(\.(dev|post)[1-9][0-9]*)?$' - DEV_TAG_REGEX='\.(dev|post)[1-9][0-9]*$' + TAG_REGEX="${{ env.TAG_REGEX }}" + DEV_TAG_REGEX="${{ env.DEV_TAG_REGEX }}" TAG_NAME=${GITHUB_REF#refs/tags/} PACKAGE_VERSION=${{ needs.test.outputs.PACKAGE_VERSION }} diff --git a/automata/__init__.py b/automata/__init__.py index 8efe9d5..8479230 100644 --- a/automata/__init__.py +++ b/automata/__init__.py @@ -8,9 +8,10 @@ # __author__ = 'Roy Levien' ; # See - http://www.python.org/dev/peps/pep-0440/ -# ^v(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))((a|b|rc)[1-9][0-9]+)?(\.(dev|post)[1-9][0-9]*)?$ +# ^v(0|[1-9][0-9]*)(\.(0|[1-9][0-9]*))((a|b|rc)(0|[1-9][0-9]*))?(\.(dev|post)(0|[1-9][0-9]*))?$ # regexr.com/7mmq7 # USE - +# See - https://py-pkgs.org/07-releasing-versioning.html#version-numbering __release__ = '0.1' # N(.N)* # USE - To indicate status of release, can be on any branch __pre_release__ = 'a3' # aN | bN | rcN