Skip to content
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
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ jobs:

- name: Create PR
run: |
LAST_PR=$(gh pr list --repo ${{ github.repository }} --limit 1 --state merged --search "Release version" --json number | jq -r '.[0].number')
./script/workflows/generate-release-notes.sh $LAST_PR ${{ env.new_version }}
gh pr create \
--title "Release version ${{ env.new_version }}" \
--body "Release version ${{ env.new_version }}" \
--body-file releasenotes.md \
--base main \
--head release/${{ env.new_version }}
env:
Expand Down
6 changes: 6 additions & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Release 0.25.7
- Add working lock file and update script to add it to the npm workspace root \n
- Make pre-prepare run off of hooks \n
- @muzimuzhi - Upgrade vsce 2.11.0 to @vscode/vsce version 2.19.0 \n
- Update workflow file \n
- Release version 0.25.6 \n
30 changes: 30 additions & 0 deletions script/workflows/generate-release-notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# this script is used to generate release notes for a given release
# first argument is the pull request id for the last release
# the second is the new release number

# the script then grabs every pull request merged since that pull request
# and outputs a string of release notes

echo "Generating release notes for $2"

# get the last release pull request id
LAST_RELEASE_PR=$1

# get the new release number
NEW_RELEASE=$2

#get when the last release was merged
LAST_RELEASE_MERGED_AT=$(gh pr view $LAST_RELEASE_PR --repo github/vscode-github-actions --json mergedAt | jq -r '.mergedAt')

CHANGELIST=$(gh pr list --repo github/vscode-github-actions --base main --state merged --json title --search "merged:>$LAST_RELEASE_MERGED_AT -label:no-release")

# store the release notes in a variable so we can use it later

echo "Release $NEW_RELEASE" >> releasenotes.md

echo $CHANGELIST | jq -r '.[].title' | while read line; do
echo " - $line" >> releasenotes.md
done

echo " "