From 223956a46ba1fb8ecd3431c1f2437ed544235377 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Tue, 20 Dec 2022 16:07:47 +0000 Subject: [PATCH] OPS: Use new `octue/check-semantic-version` GitHub action --- .github/workflows/python-ci.yml | 18 ++++----------- mkver.conf | 41 --------------------------------- 2 files changed, 5 insertions(+), 54 deletions(-) delete mode 100644 mkver.conf diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index aeb8b26..0021f8c 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -9,25 +9,17 @@ name: python-ci on: [push] jobs: - check-semantic-version: if: "!contains(github.event.head_commit.message, 'skipci')" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: - # Set fetch-depth to 0 to fetch all tags (necessary for git-mkver to determine the correct semantic version). fetch-depth: 0 - - uses: actions/setup-python@v2 - - name: Install git-mkver - run: | - curl -L https://github.com/idc101/git-mkver/releases/download/v1.2.1/git-mkver-linux-amd64-1.2.1.tar.gz \ - | tar xvz \ - && sudo mv git-mkver /usr/local/bin - - name: Install semantic version checker - run: pip install git+https://github.com/octue/conventional-commits - - name: Check version - run: check-semantic-version setup.py + - uses: octue/check-semantic-version@1.0.0.beta-9 + with: + path: setup.py + breaking_change_indicated_by: minor run-tests: if: "!contains(github.event.head_commit.message, 'skipci')" diff --git a/mkver.conf b/mkver.conf deleted file mode 100644 index 0370c28..0000000 --- a/mkver.conf +++ /dev/null @@ -1,41 +0,0 @@ -tagPrefix: "" -defaults { - tag: false - tagMessageFormat: "Release/{Tag}" - preReleaseFormat: "RC{PreReleaseNumber}" - buildMetaDataFormat: "{Branch}.{ShortHash}" - includeBuildMetaData: false - whenNoValidCommitMessages: IncrementPatch - patches: [setup.py] -} - -patches: [ - { - name: setup.py - filePatterns: ["setup.py"] - replacements: [ - { - find: "version=\"{VersionRegex}\"" - replace: "version=\"{Version}\"" - } - ] - } -] - -commitMessageActions: [ - # Disable major version increments while package is still in beta (i.e. keep the version below 1.0.0). - { - pattern: "BREAKING CHANGE" - action: IncrementMinor - } - { - pattern: "BREAKING-CHANGE" - action: IncrementMinor - } - - # All new features require a minor version increase. - { - pattern: "FEA:" - action: IncrementMinor - } -]