added check for docs

This commit is contained in:
Schmieder, Jacob
2024-05-31 12:30:10 +00:00
parent 5ebfb647f2
commit 72f57d5a7f
2 changed files with 31 additions and 2 deletions
+15 -1
View File
@@ -16,7 +16,20 @@ jobs:
with:
fetch-depth: 0
- name: Check if Source Branch is docs
id: check_docs_branch
run: |
pr_head_ref="${{ github.event.pull_request.head.ref }}"
if [[ "$pr_head_ref" == "docs" ]]; then
echo "is_docs_branch=true" >> $GITHUB_ENV
echo "This is a docs branch merge. Exiting without creating a tag."
exit 0
else
echo "is_docs_branch=false" >> $GITHUB_ENV
fi
- name: Bump Version and Tag
if: env.is_docs_branch != 'true'
id: bump_version
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -67,6 +80,7 @@ jobs:
git push origin $new_tag
- name: Extract Release Notes
if: env.is_docs_branch != 'true'
id: extract_notes
run: |
version="${{ env.new_tag }}"
@@ -85,6 +99,7 @@ jobs:
echo "EOF" >> $GITHUB_ENV
- name: Create Release
if: env.is_docs_branch != 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -94,4 +109,3 @@ jobs:
body: ${{ env.RELEASE_NOTES }}
draft: false
prerelease: false