From 06e0acb33858bb3365851b4cb21aab7d6d2c4d6b Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 11 Jan 2025 15:40:32 +1100 Subject: [PATCH] WIP --- .github/workflows/release.yml | 36 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ac36d4c0..b2dabcb77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,16 +27,12 @@ jobs: # exit 1 # fi - - name: Setup GitHub CLI - run: | - gh auth setup-git - gh auth status - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Check for Blocking Issues/PRs id: check_blocks run: | + gh auth setup-git + gh auth status + echo "Checking for blocking issues and PRs..." # Check for blocking issues @@ -59,27 +55,21 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Get Latest Tag - id: get_latest_tag + - name: Calculate next version run: | latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1) || echo "v0.0.0") echo "Latest tag: $latest_tag" - echo "latest_tag=$latest_tag" >> $GITHUB_ENV - - - name: Bump Version - id: bump_version - run: | - IFS='.' read -r major minor patch <<< "${{ env.latest_tag }}" + IFS='.' read -r major minor patch <<< "$latest_tag" new_minor=$((minor + 1)) new_tag="$major.$new_minor.0" echo "New tag: $new_tag" echo "new_tag=$new_tag" >> $GITHUB_ENV - # - name: Push New Tag - # run: | - # git config user.name "github-actions[bot]" - # git config user.email "github-actions[bot]@users.noreply.github.com" - # git tag example-${{ env.new_tag }} - # git push origin example-${{ env.new_tag }} - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push New Tag + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag example-${{ env.new_tag }} + git push origin example-${{ env.new_tag }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}