This commit is contained in:
Jesse Duffield 2025-01-11 15:40:32 +11:00
parent 50bd95be88
commit 06e0acb338

View file

@ -27,16 +27,12 @@ jobs:
# exit 1 # exit 1
# fi # 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 - name: Check for Blocking Issues/PRs
id: check_blocks id: check_blocks
run: | run: |
gh auth setup-git
gh auth status
echo "Checking for blocking issues and PRs..." echo "Checking for blocking issues and PRs..."
# Check for blocking issues # Check for blocking issues
@ -59,27 +55,21 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Latest Tag - name: Calculate next version
id: get_latest_tag
run: | run: |
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1) || echo "v0.0.0") 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"
echo "latest_tag=$latest_tag" >> $GITHUB_ENV IFS='.' read -r major minor patch <<< "$latest_tag"
- name: Bump Version
id: bump_version
run: |
IFS='.' read -r major minor patch <<< "${{ env.latest_tag }}"
new_minor=$((minor + 1)) new_minor=$((minor + 1))
new_tag="$major.$new_minor.0" new_tag="$major.$new_minor.0"
echo "New tag: $new_tag" echo "New tag: $new_tag"
echo "new_tag=$new_tag" >> $GITHUB_ENV echo "new_tag=$new_tag" >> $GITHUB_ENV
# - name: Push New Tag - name: Push New Tag
# run: | run: |
# git config user.name "github-actions[bot]" git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com" git config user.email "github-actions[bot]@users.noreply.github.com"
# git tag example-${{ env.new_tag }} git tag example-${{ env.new_tag }}
# git push origin example-${{ env.new_tag }} git push origin example-${{ env.new_tag }}
# env: env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}