Commit de98fbe7 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch '92-feat-find-a-way-to-bump-versions-in-files-in-semantic-release-job' into 'master'

feat: adds python:semantic-release:version atomic job

Closes #92

See merge request ci/templates!66
parents eaa686d9 cffd32b7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
---
include:
  - local: "alm/semantic-release.yml"
  - local: "python/semantic-release/version.yml"
  - local: "python/build.yml"
  - local: "python/twine.yml"

@@ -8,6 +9,9 @@ python:build:
  rules:
    - if: $CI_COMMIT_TAG

semantic-release:
  needs: ["python:semantic-release:version"]

python:twine:
  rules:
    - if: $CI_COMMIT_TAG
+15 −0
Original line number Diff line number Diff line
---
python:semantic-release:version:
  image: registry.gitlab.com/notno/python-semantic-releaser:3.9
  stage: build
  script:
    - pip install python-semantic-release
    # 1. semantic release will bump versions in files -> we want this
    # 2. THEN it will try to commit to git -> we don't want this! -> we let it fail and hide the output
    - env -u GIT_EMAIL -u GIT_USERNAME semantic-release version &>/dev/null || true
    # 3. all changed files are passed as artifacts to the next stages
  artifacts:
    paths:
      - ./*
    exclude:
      - .git