Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove release notes template. CD workflow create release with no release notes #444

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/actions/release/create-draft-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,43 +54,19 @@ runs:
fi
shell: bash

- name: Extract release notes
id: extract_release_notes
run: |
tag="${{ inputs.tag }}"
changelog_file="changelog.md"
section_names="Changed|Added"

# Extract the "Changed" and "Added" sections from changelog.md for the given tag
release_notes=$(awk -v tag="$tag" -v sections="$section_names" 'BEGIN{in_tag=0;in_section=0;section_regex="^## ("sections")$";}/^# /{if($0=="# "tag){in_tag=1;next;}else if(in_tag){exit;}}/^## /{if(in_tag&&match($0,section_regex)){in_section=1;print $0;next;}else if(in_tag){in_section=0;}}{if(in_section&&in_tag)print $0;}' "$changelog_file")

# Escape special characters for GitHub Actions output
release_notes="${release_notes//'%'/'%25'}"
release_notes="${release_notes//$'\n'/'%0A'}"
release_notes="${release_notes//$'\r'/'%0D'}"
echo "release_notes=$release_notes" >> $GITHUB_OUTPUT
shell: bash

- name: Checkout specific SHA
uses: actions/checkout@v4
with:
ref: ${{ inputs.sha }}
path: release-sha

- name: Process release notes
shell: bash
run: |
# Replace [THIS_WILL_BE_SET_AUTOMATICALLY] with release version if it exists
sed "s/\[THIS_WILL_BE_SET_AUTOMATICALLY\]/${{ inputs.tag }}/g" release-sha/release-notes-template.md > release-notes.md

- name: Create draft release
id: create_release
if: ${{ steps.check_release.outputs.release_exists == 'false' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag }}
name: "Partner Chains Node ${{ inputs.tag }}"
body_path: release-notes.md
draft: true
prerelease: true
generate_release_notes: false
Expand Down
37 changes: 0 additions & 37 deletions release-notes-template.md

This file was deleted.