diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 20c5ae2..9ee935f 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -16,7 +16,27 @@ permissions: contents: read 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/tinysemver@v2.0.7 + with: + verbose: "true" + version-file: "VERSION" + update-version-in: | + package.json:"version": "(\d+\.\d+\.\d+)" + package-lock.json:"uform",\n\s+"version": "(\d+\.\d+\.\d+)" + CITATION.cff:^version: (\d+\.\d+\.\d+) + pyproject.toml:^version = "(\d+\.\d+\.\d+)" + dry-run: "true" + test_python: name: Test Python runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2aaefe..03a15f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,16 +15,28 @@ permissions: jobs: versioning: - name: Semantic Release + name: Update Version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: + fetch-depth: 0 persist-credentials: false - - uses: actions/setup-node@v4 + - name: Run TinySemVer + uses: ashvardanian/tinysemver@v2.0.7 with: - node-version: 20 - - run: npm install --save-dev --prefix ./package-ci @semantic-release/exec @semantic-release/git conventional-changelog-eslint semantic-release && npx --prefix ./package-ci semantic-release + verbose: "true" + version-file: "VERSION" + update-version-in: | + package.json:"version": "(\d+\.\d+\.\d+)" + package-lock.json:"uform",\n\s+"version": "(\d+\.\d+\.\d+)" + CITATION.cff:^version: (\d+\.\d+\.\d+) + pyproject.toml:^version = "(\d+\.\d+\.\d+)" + dry-run: "false" + push: "true" + create-release: "true" + github-token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} rebase: name: Rebase Dev. Branch diff --git a/.github/workflows/update_version.sh b/.github/workflows/update_version.sh deleted file mode 100755 index c8068df..0000000 --- a/.github/workflows/update_version.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -echo $1 > VERSION && - sed -i "s/\"version\": \".*\"/\"version\": \"$1\"/" package.json && - sed -i "s/^version: .*/version: $1/" CITATION.cff && - sed -i "s/version = \".*\"/version = \"$1\"/" pyproject.toml \ No newline at end of file diff --git a/.releaserc b/.releaserc deleted file mode 100644 index 9b1f15e..0000000 --- a/.releaserc +++ /dev/null @@ -1,84 +0,0 @@ -{ - "branches": [ - "main" - ], - "debug": true, - "ci": true, - "dryRun": false, - "plugins": [ - [ - "@semantic-release/commit-analyzer", - { - "preset": "eslint", - "releaseRules": [ - { - "tag": "Break", - "release": "major" - }, - { - "tag": "Add", - "release": "minor" - }, - { - "tag": "Improve", - "release": "patch" - }, - { - "tag": "Make", - "release": "patch" - }, - { - "tag": "Refactor", - "release": false - } - ] - } - ], - [ - "@semantic-release/release-notes-generator", - { - "preset": "eslint", - "releaseRules": [ - { - "tag": "Break", - "release": "major" - }, - { - "tag": "Add", - "release": "minor" - }, - { - "tag": "Improve", - "release": "patch" - }, - { - "tag": "Make", - "release": "patch" - }, - { - "tag": "Refactor", - "release": false - } - ] - } - ], - "@semantic-release/github", - [ - "@semantic-release/exec", - { - "prepareCmd": "bash .github/workflows/update_version.sh '${nextRelease.version}'" - } - ], - [ - "@semantic-release/git", - { - "assets": [ - "VERSION", - "pyproject.toml", - "CITATION.cff" - ], - "message": "Build: Released ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" - } - ] - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3275f93..8be09b8 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { "cSpell.words": [ "arange", + "ashvardanian", "astype", "CFURL", "coreml", diff --git a/package-ci.json b/package-ci.json deleted file mode 100644 index e5e5b93..0000000 --- a/package-ci.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "uform-ci", - "version": "1.0.0", - "devDependencies": { - "@semantic-release/exec": "^6.0.3", - "@semantic-release/git": "^10.0.1", - "conventional-changelog-eslint": "^3.0.9", - "semantic-release": "^21.1.2" - } -} \ No newline at end of file