From bf01ecc1f9c2a60f5987115757162aa01f71c1ff Mon Sep 17 00:00:00 2001 From: Joseph Cosentino Date: Thu, 13 Jun 2024 23:06:13 -0700 Subject: [PATCH] release script, change release name --- .github/workflows/release.yml | 2 +- release.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 release.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee93530..dc8a204 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + release_name: Resume ${{ github.ref }} draft: false prerelease: false - name: Upload Release Asset diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..d50bc7e --- /dev/null +++ b/release.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +STARTING_TAG=v1 + +git fetch --tags +LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null) +if [ -z "${LATEST_TAG}" ]; then + NEXT_TAG="${STARTING_TAG}" +else + VERSION=${LATEST_TAG#v} + NEXT_VERSION=$((VERSION + 1)) + NEXT_TAG="v${NEXT_VERSION}" +fi + +echo "Creating tag: ${NEXT_TAG}" + +git tag ${NEXT_TAG} +git push origin ${NEXT_TAG}