ci: update release
Some checks failed
CI / Build and Test (push) Has been cancelled
CI / Create Version Tag (push) Has been cancelled
CI / Publish Release (push) Has been cancelled

This commit is contained in:
Paul Hatcherian 2026-01-19 08:31:08 -06:00
parent 9c93fcdb24
commit 7bf8143b3b
2 changed files with 37 additions and 1 deletions

View file

@ -54,6 +54,41 @@ jobs:
env:
DEBUG_OUTPUT: ${{ steps.run.outputs.debug_output }}
create-tag:
name: Create Version Tag
needs: build
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
filter: blob:none
- name: Get version
uses: ./
id: version
- name: Check if tag exists
id: check
run: |
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Create and push tag
if: steps.check.outputs.exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
release:
name: Publish Release
needs: build

View file

@ -182,7 +182,8 @@ zero to pull the full history and tags.
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
fetch-depth: 0 # fetch all history
filter: blob:none # exclude file contents for faster checkout
```
Alternatively, you can set this number to a value high enough to pull all the commits