diff --git a/.github/bump_version.sh b/.github/bump_version.sh deleted file mode 100755 index d2fe689..0000000 --- a/.github/bump_version.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Fetch tags -git fetch --tags - -# Get the latest tag -latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) - -# If there are no tags yet, start with 0.0.1 -if [ -z "$latest_tag" ]; then - new_tag="0.0.1" -else - # Increment the version - major=$(echo $latest_tag | cut -d. -f1) - minor=$(echo $latest_tag | cut -d. -f2) - patch=$(echo $latest_tag | cut -d. -f3) - if [ $patch -lt 99 ]; then - let patch+=1 - else - let minor+=1 - patch=0 - fi - new_tag="${major}.${minor}.${patch}" -fi - -# Set output for the next steps -echo "Setting new tag to $new_tag" -echo "::set-output name=new_tag::$new_tag" - -# Create the new tag -git tag $new_tag \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3e0430..7e8fcea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,7 @@ jobs: uses: goreleaser/goreleaser-action@v2 with: version: latest - args: release --rm-dist --tag ${{ steps.bump_version.outputs.new_tag }} + args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +