Skip to content

Commit d8ab111

Browse files
authored
ci: update GitHub Actions publish workflow to automatically create GitHub Releases (#1803)
1 parent daf9ae8 commit d8ab111

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"roo-cline": patch
3+
---
4+
5+
Update GitHub Actions workflow to automatically create GitHub Releases

.github/workflows/marketplace-publish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,29 @@ jobs:
6262
current_package_version=$(node -p "require('./package.json').version")
6363
npm run publish:marketplace
6464
echo "Successfully published version $current_package_version to VS Code Marketplace"
65+
66+
- name: Create GitHub Release
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
run: |
70+
current_package_version=$(node -p "require('./package.json').version")
71+
72+
# Extract changelog for current version
73+
changelog_content=$(awk -v ver="## [${current_package_version}]" '
74+
$0 ~ ver {flag=1; next}
75+
/^## \[/ {if (flag) exit}
76+
flag {print}
77+
' CHANGELOG.md)
78+
79+
# If changelog extraction failed, use a default message
80+
if [ -z "$changelog_content" ]; then
81+
changelog_content="Release v${current_package_version}"
82+
fi
83+
84+
# Create release with changelog content
85+
gh release create "v${current_package_version}" \
86+
--title "Release v${current_package_version}" \
87+
--notes "$changelog_content" \
88+
--target ${{ env.GIT_REF }} \
89+
bin/roo-cline-${current_package_version}.vsix
90+
echo "Successfully created GitHub Release v${current_package_version}"

0 commit comments

Comments
 (0)