From 22ffb71c35ee7f097b9fb54d282f9c1d3f3d953f Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sun, 29 Jan 2023 23:53:52 +1000 Subject: [PATCH] Stateless Versioning (#293) --- .github/workflows/create_tag.yml | 13 +++---------- version | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 version diff --git a/.github/workflows/create_tag.yml b/.github/workflows/create_tag.yml index 494f0ed..394f37e 100644 --- a/.github/workflows/create_tag.yml +++ b/.github/workflows/create_tag.yml @@ -1,4 +1,4 @@ -name: Increment version and create tag +name: Create tag on: workflow_dispatch: @@ -22,7 +22,7 @@ jobs: - name: Get current version run: | - VERSION=$(cat version | grep version: | awk '{print $2}') + VERSION=$(git describe --abbrev=0 --tags) - name: Increment version run: | @@ -45,15 +45,8 @@ jobs: # Update the version NEW_VERSION="v$MAJOR.$MINOR.$PATCH" - sed -i "s/version: $VERSION/version: $NEW_VERSION/" version - - - name: Commit and push changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "Release $NEW_VERSION" - push: true - name: Create tag run: | git tag $NEW_VERSION - git push origin $NEW_VERSION + git push --tags diff --git a/version b/version deleted file mode 100644 index a025224..0000000 --- a/version +++ /dev/null @@ -1 +0,0 @@ -v2.0.15 \ No newline at end of file