Commit b35057b2 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

ci(semrel): yaml semrel congif (with comments)

parent 673a1ed8
Loading
Loading
Loading
Loading
+26 −31
Original line number Diff line number Diff line
plugins: [
  "@semantic-release/commit-analyzer",
  "@semantic-release/release-notes-generator",
  "@semantic-release/gitlab",
  "@semantic-release/changelog",   
  [
    "semantic-release-replace-plugin",
    {
      "replacements": [
        {
          "files": [ "pyproject.toml" ],
          "from": [ "^version *= *\"\\d+\\.\\d+\\.\\d+\"" ],
          "to": "version = \"${nextRelease.version}\"",
          "countMatches": true
        }
      ]
    }
  ],
  [
    "@semantic-release/git",
    {
      "assets": ["*.md", "*.toml"],
      "message": "chore(semantic-release): release ${nextRelease.version} - [ci skip on prod]"
    }
  ]
]

plugins:
  - '@semantic-release/commit-analyzer'
  - '@semantic-release/release-notes-generator'
  - '@semantic-release/gitlab'
  # generates the CHANGELOG.md
  - '@semantic-release/changelog'
  # emulates bumpversion (replaces version in pyproject.toml)
  - - semantic-release-replace-plugin
    - replacements:
        - files:
            - pyproject.toml
          from:
            - ^version *= *"\d+\.\d+\.\d+"
          to: 'version = "${nextRelease.version}"'
          countMatches: true
  # git commit/push modified files (CHANGELOG.md & pyproject.toml)
  - - '@semantic-release/git'
    - assets:
        - '*.md'
        - '*.toml'
      # the commit MUST trigger a pipeline on tag (to perform publish jobs)
      # can be skipped on prod branch
      message: 'chore(semantic-release): release ${nextRelease.version} - [ci skip on prod]'
branches:
  - "main"
  - "master"

tagFormat: "${version}"
  - main
  - master
tagFormat: '${version}'