-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed docs generation in release workflow
- Loading branch information
1 parent
54cf017
commit 5fb0f1f
Showing
2 changed files
with
27 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Exit immediately if a command exits with a non-zero status. | ||
set -e | ||
|
||
# Configure git to use the OpenSauced bot account | ||
git config user.name 'open-sauced[bot]' | ||
git config user.email '63161813+open-sauced[bot]@users.noreply.github.com' | ||
|
||
# Semantic release made changes, so pull the latest changes from the current branch | ||
git pull origin "$GITHUB_REF" | ||
|
||
# Generate documentation | ||
just gen-docs | ||
|
||
# Get the author of the last non-merge commit | ||
LAST_COMMIT_AUTHOR=$(git log -1 --no-merges --pretty=format:'%an <%ae>') | ||
|
||
# Commit with co-authorship and push changes | ||
git add docs/ | ||
git commit -m "chore: automated docs generation for release | ||
Co-authored-by: $LAST_COMMIT_AUTHOR" || echo "No changes to commit" | ||
git push origin HEAD:"$GITHUB_REF" |