Skip to content

Commit

Permalink
Make: Switch to TinySemVer
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Oct 4, 2024
1 parent d709b0b commit f1bab22
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 100 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,30 @@ permissions:

jobs:

versioning:
name: Update Version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/[email protected]
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
CMakeLists.txt:VERSION (\d+\.\d+\.\d+)
update-major-version-in: |
include/ucall/ucall.h:^#define UCALL_VERSION_MAJOR (\d+)
update-minor-version-in: |
include/ucall/ucall.h:^#define UCALL_VERSION_MINOR (\d+)
update-patch-version-in: |
include/ucall/ucall.h:^#define UCALL_VERSION_PATCH (\d+)
dry-run: "true"

test_python:
name: Test Python
runs-on: ${{ matrix.os }}
Expand Down
32 changes: 23 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,31 @@ permissions:
jobs:

versioning:
name: Semantic Release
name: Update Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install --save-dev @semantic-release/exec @semantic-release/git conventional-changelog-eslint semantic-release && npx semantic-release

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/[email protected]
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
CMakeLists.txt:VERSION (\d+\.\d+\.\d+)
update-major-version-in: |
include/ucall/ucall.h:^#define UCALL_VERSION_MAJOR (\d+)
update-minor-version-in: |
include/ucall/ucall.h:^#define UCALL_VERSION_MINOR (\d+)
update-patch-version-in: |
include/ucall/ucall.h:^#define UCALL_VERSION_PATCH (\d+)
dry-run: "false"
push: "true"
create-release: "true"
github-token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}

build_wheels:
name: Build Python ${{ matrix.python-version }} for ${{ matrix.os }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/update_version.sh

This file was deleted.

84 changes: 0 additions & 84 deletions .releaserc

This file was deleted.

0 comments on commit f1bab22

Please sign in to comment.