diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5315eb3d0a713548178c1608cc53bbc5d4f1c9b7..f5f8f23335661abbdcfc33692e02ab48d24a4846 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,8 @@ stages: - testing - security - docs +- package +- release # Change pip's cache directory to be inside the project directory since we can # only cache local items. @@ -17,24 +19,28 @@ before_script: - pip install --user --no-warn-script-location -r requirements.txt # install dependencies from file PEP8: stage: linting + needs: [] script: - pip install flake8 - flake8 --count --max-line-length=88 . Pylint: stage: linting + needs: [] script: - pip install pylint - find . -type f -name '*.py' | xargs pylint -rn --rcfile='plotid/.pylintrc' # Find all python files and check the code with pylint Autoformatting: stage: linting + needs: [] script: - pip install black - black --check --verbose --diff --color . Typechecker: stage: linting + needs: [] script: - pip install mypy - mypy --ignore-missing-imports --strict plotid examples @@ -42,6 +48,7 @@ Typechecker: test: stage: testing + needs: [] tags: - docker script: @@ -85,6 +92,28 @@ include: - template: Security/Dependency-Scanning.gitlab-ci.yml - template: Security/License-Scanning.gitlab-ci.yml +build_and_upload: + stage: package + script: + - pip install build twine + - python3 -m build + - TWINE_PASSWORD=${CI_PYPI_TOKEN} TWINE_USERNAME=__token__ python3 -m twine upload dist/* + rules: + - if: $CI_COMMIT_TAG + +release_job: + stage: release + image: registry.gitlab.com/gitlab-org/release-cli:latest + rules: + - if: $CI_COMMIT_TAG # Run this job when a tag is created + before_script: + - echo "No before script pls" + script: + - echo "running release_job" + release: # See https://docs.gitlab.com/ee/ci/yaml/#release for available properties + tag_name: '$CI_COMMIT_TAG' + description: '$CI_COMMIT_TAG' + # You can override the included template(s) by including variable overrides # SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings # Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings diff --git a/plotid/__init__.py b/plotid/__init__.py index e572fc044d3a808bc423cb488588097f4b1a40ce..19ab64467ef0756230c448d88061174adae920b6 100644 --- a/plotid/__init__.py +++ b/plotid/__init__.py @@ -10,5 +10,5 @@ research data, the plot is based on. Additionally, the script that created the plot will also be copied to the directory. """ -__version__ = "0.2.2" +__version__ = "0.2.2-b3" __author__ = "Institut Fluidsystemtechnik within nfdi4ing at TU Darmstadt"