Skip to content
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "${{ needs.release-please.outputs.tag_name }}" patchloom.vsix
- name: Apply custom release notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -f RELEASE_NOTES.md ]; then
echo "Custom release notes found, updating release body..."
gh release edit "${{ needs.release-please.outputs.tag_name }}" --notes-file RELEASE_NOTES.md
else
echo "No custom release notes, using auto-generated notes"
fi
# See ~/.grok/skills/vsce-publish/SKILL.md (or /vsce-publish) for the full
# one-time browser setup (aex.dev.azure.com, PAT scopes, Open VSX agreement
# + create-namespace + ownership claim), secret names, and troubleshooting.
Expand All @@ -97,3 +107,34 @@ jobs:
color: blue
namedLogo: visualstudiocode
logoColor: white
# Clean up RELEASE_NOTES.md after release (uses App token so the PR triggers CI/auto-approve)
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
if: hashFiles('RELEASE_NOTES.md') != ''
id: cleanup-token
with:
client-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Clean up release notes file
if: steps.cleanup-token.outcome == 'success'
env:
GH_TOKEN: ${{ steps.cleanup-token.outputs.token }}
run: |
if git ls-tree HEAD --name-only | grep -q '^RELEASE_NOTES.md$'; then
TAG="${{ needs.release-please.outputs.tag_name }}"
BRANCH="chore/cleanup-release-notes-${TAG}"
gh api "repos/${{ github.repository }}/git/refs" \
-f ref="refs/heads/$BRANCH" \
-f sha="$(git rev-parse HEAD)"
FILE_SHA=$(gh api \
"repos/${{ github.repository }}/contents/RELEASE_NOTES.md?ref=$BRANCH" \
--jq '.sha')
gh api --method DELETE \
"repos/${{ github.repository }}/contents/RELEASE_NOTES.md" \
-f message="chore: remove release notes override" \
-f sha="$FILE_SHA" \
-f branch="$BRANCH"
PR_URL=$(gh pr create --base main --head "$BRANCH" \
--title "chore: remove release notes override" \
--body "Auto-cleanup after ${TAG} release.")
gh pr merge "$PR_URL" --auto --squash
fi