Skip to content

Commit d458f0b

Browse files
pladisdevCopilotCopilot
authored
Development (#19)
* pop up mode and chat buble toggle * potential audio fix * linux sh and better docker support * fixed linux build? * linux fix part 2 * docker fix part 1 * Initial plan * Initial plan * Initial plan * Initial plan * Initial plan * Initial plan * Initial plan * Update frontend/src/pages/YappersPage.jsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Initial plan * Update frontend/src/pages/YappersPage.jsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Replace sys.platform with platform.system() for OS detection Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * Fix race condition in popup avatar lifecycle Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * Extract magic numbers to named constants for better readability Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * Extract magic number -2.5px into avatarActiveOffset setting Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * Fix audio cleanup in popup mode when play() fails Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * Extract hex opacity calculation to utility function Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * Fix audio error handlers to clean up tracking references Co-authored-by: pladisdev <127021507+pladisdev@users.noreply.github.com> * update flow for builds * better build and release file --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 485bc61 commit d458f0b

1 file changed

Lines changed: 81 additions & 25 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 81 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -243,28 +243,86 @@ jobs:
243243
body: comment
244244
});
245245
246-
- name: Download Docker artifacts
246+
- name: Upload Windows artifacts for release
247247
if: steps.version.outputs.is_release == 'true'
248+
uses: actions/upload-artifact@v4
249+
with:
250+
name: windows-build
251+
path: |
252+
dist/ChatYapper.exe
253+
dist/msi/*.msi
254+
retention-days: 90
255+
256+
create-release:
257+
name: Create GitHub Release
258+
runs-on: ubuntu-latest
259+
needs: [build, linux-build, docker-build]
260+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
261+
262+
steps:
263+
- name: Checkout code
264+
uses: actions/checkout@v4
265+
266+
- name: Get version from backend/version.py
267+
id: get_version
268+
run: |
269+
if [ -f "backend/version.py" ]; then
270+
version=$(grep -oP '__version__\s*=\s*["\047]\K[^"\047]+' backend/version.py || echo "1.0.0")
271+
else
272+
version="1.0.0"
273+
fi
274+
echo "app_version=$version" >> $GITHUB_OUTPUT
275+
echo "version=v$version" >> $GITHUB_OUTPUT
276+
277+
- name: Download Windows build artifacts
248278
uses: actions/download-artifact@v4
249279
with:
250-
name: docker-release-files
251-
path: ./docker-release
280+
name: windows-build
281+
path: ./windows-build
252282

253-
- name: Download Linux build
254-
if: steps.version.outputs.is_release == 'true'
283+
- name: Download Linux build artifacts
255284
uses: actions/download-artifact@v4
256285
with:
257286
name: linux-build
258287
path: ./linux-build
259288

260-
- name: Create Release (on merge to main)
261-
if: steps.version.outputs.is_release == 'true'
289+
- name: Download Docker artifacts
290+
if: needs.docker-build.result == 'success'
291+
uses: actions/download-artifact@v4
292+
with:
293+
name: docker-release-files
294+
path: ./docker-release
295+
continue-on-error: true
296+
297+
- name: Get MSI filename
298+
id: msi_info
299+
run: |
300+
msi_file=$(ls windows-build/dist/msi/*.msi 2>/dev/null | head -n1 || echo "")
301+
if [ -n "$msi_file" ]; then
302+
msi_name=$(basename "$msi_file")
303+
echo "msi_name=$msi_name" >> $GITHUB_OUTPUT
304+
else
305+
echo "msi_name=ChatYapper.msi" >> $GITHUB_OUTPUT
306+
fi
307+
308+
- name: Check Docker build status
309+
id: docker_status
310+
run: |
311+
if [ "${{ needs.docker-build.result }}" == "success" ]; then
312+
echo "docker_success=true" >> $GITHUB_OUTPUT
313+
echo "Docker build succeeded"
314+
else
315+
echo "docker_success=false" >> $GITHUB_OUTPUT
316+
echo "Docker build failed or was skipped - release will not include Docker files"
317+
fi
318+
319+
- name: Create Release
262320
uses: softprops/action-gh-release@v1
263321
with:
264-
tag_name: ${{ steps.version.outputs.version }}
265-
name: Chat Yapper ${{ steps.version.outputs.version }}
322+
tag_name: ${{ steps.get_version.outputs.version }}
323+
name: Chat Yapper ${{ steps.get_version.outputs.version }}
266324
body: |
267-
## Chat Yapper ${{ steps.version.outputs.version }}
325+
## Chat Yapper ${{ steps.get_version.outputs.version }}
268326
269327
### What's Changed
270328
This release was automatically created from the latest merge to main.
@@ -328,22 +386,19 @@ jobs:
328386
- **Issues:** https://github.com/${{ github.repository }}/issues
329387
- **Discussions:** https://github.com/${{ github.repository }}/discussions
330388
files: |
331-
dist/ChatYapper.exe
332-
dist/msi/*.msi
389+
windows-build/dist/ChatYapper.exe
390+
windows-build/dist/msi/*.msi
333391
linux-build/*.tar.gz
334-
docker-release/docker-compose-release.yml
335-
docker-release/.env.example
336-
docker-release/DOCKER_INSTALL.md
392+
docker-release/*
337393
draft: false
338394
prerelease: false
395+
fail_on_unmatched_files: false
339396

340397
- name: Notify release created
341-
if: steps.version.outputs.is_release == 'true'
342398
run: |
343-
Write-Host "Release created successfully!"
344-
Write-Host "Version: ${{ steps.version.outputs.version }}"
345-
Write-Host "View at: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.version }}"
346-
shell: powershell
399+
echo "Release created successfully!"
400+
echo "Version: ${{ steps.get_version.outputs.version }}"
401+
echo "View at: https://github.com/${{ github.repository }}/releases/tag/${{ steps.get_version.outputs.version }}"
347402
348403
linux-build:
349404
name: Build Linux Executable
@@ -571,6 +626,7 @@ jobs:
571626
docker-build:
572627
name: Build and Push Docker Image
573628
runs-on: ubuntu-latest
629+
continue-on-error: true
574630
needs: build # Run after Windows build succeeds
575631

576632
steps:
@@ -937,9 +993,9 @@ jobs:
937993
echo "Cannot merge to main until build succeeds"
938994
exit 1
939995
fi
940-
if [ "${{ needs.docker-build.result }}" != "success" ]; then
941-
echo "[FAIL] Docker build failed or was cancelled"
942-
echo "Cannot merge to main until build succeeds"
943-
exit 1
996+
if [ "${{ needs.docker-build.result }}" == "success" ]; then
997+
echo "[PASS] Docker build succeeded"
998+
elif [ "${{ needs.docker-build.result }}" == "failure" ]; then
999+
echo "[WARN] Docker build failed - continuing anyway (Docker build is optional)"
9441000
fi
945-
echo "[PASS] All builds succeeded - safe to merge"
1001+
echo "[PASS] Required builds succeeded - safe to merge"

0 commit comments

Comments
 (0)