-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
432f7f7
commit 5efb7de
Showing
3 changed files
with
73 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Create release notes PR | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version-name: | ||
required: true | ||
type: string | ||
release-notes: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
create_release_notes_pr: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Create release notes PR | ||
env: | ||
VERSION_NAME: ${{ inputs.version-name }} | ||
RELEASE_NOTES: ${{ inputs.release-notes }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_REPO: ${{ github.repository }} | ||
run: | | ||
# bash ./create-release-notes-pr.sh | ||
# BASE_BRANCH="release-notes" | ||
echo "Hello" | ||
# RELEASE_NOTES_FILE="$VERSION_NAME.md" | ||
# | ||
# # Check out the base branch | ||
# git fetch origin "$BASE_BRANCH" | ||
# git checkout "$BASE_BRANCH" | ||
# | ||
# # Create and switch to the new branch | ||
# git checkout -b "$VERSION_NAME" | ||
# | ||
# # Write the release notes to the file | ||
# echo "$RELEASE_NOTES" > "$RELEASE_NOTES_FILE" | ||
# | ||
# # Add, commit, and push the changes | ||
# git add "$RELEASE_NOTES_FILE" | ||
# git commit -m "Add release notes for $VERSION_NAME release" | ||
# git push origin "$VERSION_NAME" | ||
# | ||
# # Create a pull request using the GitHub API | ||
# API_URL="https://api.github.com/repos/$GITHUB_REPO/pulls" | ||
# PR_TITLE="Create release notes for $VERSION_NAME release" | ||
# PR_BODY="This PR adds release notes for the $VERSION_NAME release." | ||
# JSON_PAYLOAD=$(cat <<EOF { | ||
# "title": "$PR_TITLE", | ||
# "head": "$NEW_BRANCH", | ||
# "base": "$BASE_BRANCH", | ||
# "body": "$PR_BODY" | ||
# } | ||
# EOF) | ||
# | ||
# curl -s -X POST -H "Authorization: token $GITHUB_TOKEN" \ | ||
# -H "Content-Type: application/json" \ | ||
# -d "$JSON_PAYLOAD" "$API_URL" |
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