Skip to content

Commit fd3d33d

Browse files
committed
Consolidate GitHub release workflow to VS Code only and inline tag checking and release notes generation instead of using the shared action
- browser releases should be removed. editor releases should include browser's commits. merge action into workflow. - remove watching browser components
1 parent 478a865 commit fd3d33d

2 files changed

Lines changed: 34 additions & 100 deletions

File tree

‎.github/actions/create-app-release/action.yml‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

‎.github/workflows/github-release.yml‎

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,11 @@ on:
66
- main
77
paths:
88
- 'apps/editor/package.json'
9-
- 'apps/browser/src/manifest.json'
109

1110
permissions:
1211
contents: write
1312

1413
jobs:
15-
changes:
16-
runs-on: ubuntu-24.04
17-
outputs:
18-
editor: ${{ steps.filter.outputs.editor }}
19-
browser: ${{ steps.filter.outputs.browser }}
20-
steps:
21-
- uses: actions/checkout@v5
22-
- uses: dorny/paths-filter@v4
23-
id: filter
24-
with:
25-
filters: |
26-
editor:
27-
- 'apps/editor/package.json'
28-
browser:
29-
- 'apps/browser/src/manifest.json'
30-
3114
check:
3215
runs-on: ubuntu-24.04
3316

@@ -60,8 +43,7 @@ jobs:
6043
run: pnpm test
6144

6245
release-vscode:
63-
needs: [check, changes]
64-
if: needs.changes.outputs.editor == 'true'
46+
needs: check
6547
runs-on: ubuntu-24.04
6648

6749
steps:
@@ -77,36 +59,41 @@ jobs:
7759
VERSION=$(jq -r .version apps/editor/package.json)
7860
echo "raw_version=$VERSION" >> $GITHUB_OUTPUT
7961
80-
- name: Create Release
81-
uses: ./.github/actions/create-app-release
82-
with:
83-
app_name: 'VS Code'
84-
app_suffix: 'vscode'
85-
version: ${{ steps.package_version.outputs.raw_version }}
86-
changelog_paths: 'apps/editor packages/ui/src/components/editor'
87-
88-
release-browser:
89-
needs: [check, changes]
90-
if: needs.changes.outputs.browser == 'true'
91-
runs-on: ubuntu-24.04
62+
- name: Check if tag exists
63+
id: check_tag
64+
run: |
65+
if git ls-remote --tags origin "refs/tags/${{ steps.package_version.outputs.raw_version }}-vscode" | grep -q 'refs/tags/'; then
66+
echo "exists=true" >> $GITHUB_OUTPUT
67+
else
68+
echo "exists=false" >> $GITHUB_OUTPUT
69+
fi
70+
71+
- name: Generate Release Notes
72+
if: steps.check_tag.outputs.exists == 'false'
73+
run: |
74+
PREV_TAG=$(git describe --tags --match "*-vscode" --abbrev=0 2>/dev/null || echo "")
9275
93-
steps:
94-
- name: Checkout code
95-
uses: actions/checkout@v5
96-
with:
97-
ref: main
98-
fetch-depth: 0
76+
echo "### What's changed in the VS Code extension:" > release_notes.md
77+
echo "" >> release_notes.md
9978
100-
- name: Get version from manifest.json
101-
id: browser_version
102-
run: |
103-
VERSION=$(jq -r .version apps/browser/src/manifest.json)
104-
echo "raw_version=$VERSION" >> $GITHUB_OUTPUT
79+
CHANGELOG_PATHS=(
80+
apps/editor
81+
apps/browser
82+
packages/ui/src/components/editor
83+
packages/shared/src/constants/chatbots.ts
84+
)
85+
86+
if [ -n "$PREV_TAG" ]; then
87+
git log "${PREV_TAG}..HEAD" --pretty=format:"* %s (%h)" -- "${CHANGELOG_PATHS[@]}" >> release_notes.md
88+
else
89+
git log --pretty=format:"* %s (%h)" -- "${CHANGELOG_PATHS[@]}" >> release_notes.md
90+
fi
10591
10692
- name: Create Release
107-
uses: ./.github/actions/create-app-release
93+
if: steps.check_tag.outputs.exists == 'false'
94+
uses: softprops/action-gh-release@v3
10895
with:
109-
app_name: 'Browser'
110-
app_suffix: 'browser'
111-
version: ${{ steps.browser_version.outputs.raw_version }}
112-
changelog_paths: 'apps/browser packages/shared/src/constants/chatbots.ts packages/ui/src/components/browser'
96+
tag_name: ${{ steps.package_version.outputs.raw_version }}-vscode
97+
name: ${{ steps.package_version.outputs.raw_version }} - VS Code
98+
body_path: release_notes.md
99+
target_commitish: ${{ github.sha }}

0 commit comments

Comments
 (0)