diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cd116fe..8c820d0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,10 @@ --- - include: - local: .gitlab-ci/versioning/gitversion.yml - local: .gitlab-ci/git/create_tag.yml stages: + - build - release gitversion: @@ -12,8 +12,21 @@ gitversion: stage: .pre tags: - gitlab-org-docker - rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch +# rules: +# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + +build: + stage: build + image: python:3.9.21 + tags: + - gitlab-org-docker + needs: + - job: gitversion + artifacts: true + script: + - sed -i "s/###VERSION###/$GitVersion_SemVer/" src/optima35/__init__.py + - python3 -m pip install --upgrade pip build twine + - python3 -m build create_tag: extends: .git:create_tag @@ -21,12 +34,12 @@ create_tag: tags: - gitlab-org-docker variables: - VERSION: v$GitVersion_SemVer + VERSION: $GitVersion_SemVer TOKEN: $GITLAB_TOKEN needs: - job: gitversion artifacts: true rules: - if: $CI_COMMIT_TAG - when: never # Do not run this job when a tag is created manually - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch + when: never # Do not run this job when a tag is created manually + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch diff --git a/pyproject.toml b/pyproject.toml index b6e50a1..2f7e4bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ ] [project.urls] -Homepage = "https://gitlab.com/CodeByMrFinchum/optima35" +Source = "https://gitlab.com/CodeByMrFinchum/optima35" [project.scripts] optima35 = "optima35.__main__:main" diff --git a/src/optima35/__init__.py b/src/optima35/__init__.py index 364e7ba..f5b8609 100644 --- a/src/optima35/__init__.py +++ b/src/optima35/__init__.py @@ -1 +1 @@ -__version__ = "0.6.4" +__version__ = ###VERSION###