66 - master
77 paths :
88 - ' apps/editor/package.json'
9+ - ' apps/browser/src/manifest.json'
910
1011# Required to allow the workflow to create tags and releases
1112permissions :
6566 run : |
6667 PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
6768
68- echo "### What's Changed in apps/editor " > release_notes.md
69+ echo "### What's changed in VS Code extension: " > release_notes.md
6970 echo "" >> release_notes.md
7071
7172 if [ -n "$PREV_TAG" ]; then
8283 name : Release ${{ steps.package_version.outputs.version }}
8384 body_path : release_notes.md
8485 # Grab the compiled .vsix generated by 'vsce package'
85- files : apps/editor/*.vsix
86+ files : apps/editor/*.vsix
87+
88+ release-browser :
89+ runs-on : ubuntu-latest
90+
91+ steps :
92+ - name : Checkout code
93+ uses : actions/checkout@v4
94+ with :
95+ fetch-depth : 0
96+
97+ - name : Get version from manifest.json
98+ id : browser_version
99+ run : |
100+ VERSION=$(jq -r .version apps/browser/src/manifest.json)
101+ echo "version=browser-v$VERSION" >> $GITHUB_OUTPUT
102+
103+ - name : Check if tag exists
104+ id : check_tag
105+ run : |
106+ # Prevent failing if manifest.json was modified but version wasn't bumped
107+ if git ls-remote --tags origin refs/tags/${{ steps.browser_version.outputs.version }} | grep -q 'refs/tags/'; then
108+ echo "exists=true" >> $GITHUB_OUTPUT
109+ else
110+ echo "exists=false" >> $GITHUB_OUTPUT
111+ fi
112+
113+ - name : Setup Node.js
114+ if : steps.check_tag.outputs.exists == 'false'
115+ uses : actions/setup-node@v4
116+ with :
117+ node-version : ' 20'
118+
119+ - name : Setup PNPM
120+ if : steps.check_tag.outputs.exists == 'false'
121+ uses : pnpm/action-setup@v2
122+ with :
123+ version : 9.6.0
124+ run_install : false
125+
126+ - name : Install dependencies
127+ if : steps.check_tag.outputs.exists == 'false'
128+ run : pnpm i
129+
130+ - name : Build Browser extension
131+ if : steps.check_tag.outputs.exists == 'false'
132+ run : |
133+ cd apps/browser
134+ pnpm build
135+
136+ - name : Generate Release Notes
137+ if : steps.check_tag.outputs.exists == 'false'
138+ run : |
139+ PREV_TAG=$(git describe --tags --match "browser-v*" --abbrev=0 2>/dev/null || echo "")
140+
141+ echo "### What's changed in Browser extension:" > release_notes_browser.md
142+ echo "" >> release_notes_browser.md
143+
144+ if [ -n "$PREV_TAG" ]; then
145+ git log ${PREV_TAG}..HEAD --pretty=format:"* %s (%h)" -- apps/browser >> release_notes_browser.md
146+ else
147+ git log --pretty=format:"* %s (%h)" -- apps/browser >> release_notes_browser.md
148+ fi
149+
150+ - name : Create Release and Upload ZIPs
151+ if : steps.check_tag.outputs.exists == 'false'
152+ uses : softprops/action-gh-release@v2
153+ with :
154+ tag_name : ${{ steps.browser_version.outputs.version }}
155+ name : Browser Extension Release ${{ steps.browser_version.outputs.version }}
156+ body_path : release_notes_browser.md
157+ files : apps/browser/*.zip
0 commit comments