diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index adca87a08ce0e4cfc4205b5eafa96822986b029b..b15db2290f6c5e952ce6aa78df220173966850ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ pypi: - python -m build - twine upload -u __token__ -p ${PYPI_JUPYTERJSC_TOKEN} dist/* rules: - - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/' + - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+(\.post\d+)?$/' testpypi: stage: release @@ -29,7 +29,7 @@ testpypi: - python -m build - twine upload --repository testpypi -u __token__ -p ${TESTPYPI_JUPYTERJSC_TOKEN} dist/* rules: - - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+(\..+)$/' + - if: '$CI_COMMIT_TAG !~ /^\d+\.\d+\.\d+(\.post\d+)?$/' ### @@ -42,7 +42,7 @@ prepare_job: stage: prepare-release image: alpine:latest rules: - - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/' + - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+(\.post\d+)?$/' script: - apk add curl jq - 'curl -H "PRIVATE-TOKEN: $CI_API_TOKEN" "$CI_API_V4_URL/projects/$CI_PROJECT_ID/repository/changelog?version=$CI_COMMIT_TAG" | jq -r .notes > release_notes.md' @@ -64,7 +64,7 @@ release_job: - job: prepare_job artifacts: true rules: - - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+$/' + - if: '$CI_COMMIT_TAG =~ /^\d+\.\d+\.\d+(\.post\d+)?$/' script: - echo "Creating release" release: diff --git a/pyproject.toml b/pyproject.toml index 3dd659d441830e522d2f5e7b9b0f6189e896f95a..b96178db61edeb06dfff4c289f637e3c5ef49454 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,6 +59,7 @@ regex = ''' (?P<patch>\d+) (?P<pre>((a|b|rc)\d+)|) \.? + (?P<post>((post)\d+)|) (?P<dev>(?<=\.)dev\d*|) '''