From 2cbd2d7a848c389aa2b5164e5a318727dc496b76 Mon Sep 17 00:00:00 2001 From: Ash Vardanian <1983160+ashvardanian@users.noreply.github.com> Date: Mon, 13 Jan 2025 19:49:38 +0000 Subject: [PATCH] Make: Semantic Versioning --- .github/workflows/release.yml | 39 +++++++++++++++++++++++++++++++++++ .vscode/settings.json | 1 + 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3567f72 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +on: + push: + branches: ["main"] + +env: + BUILD_TYPE: Release + GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} + PYTHONUTF8: 1 + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: write + pages: write + id-token: write + packages: write + +jobs: + versioning: + name: Update Version + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + - name: Run TinySemVer + uses: ashvardanian/tinysemver@v2.1.1 + with: + verbose: "true" + version-file: "VERSION" + update-version-in: | + pyproject.toml:^version = "(\d+\.\d+\.\d+)" + dry-run: "false" + push: "true" + create-release: "true" + github-token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 4ac51bf..348fc7e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,6 +25,7 @@ "popcountll", "powless", "prefetcher", + "pyproject", "reorderable", "SLEEF", "StringZilla",