diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5350aeb --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,114 @@ +name: Build and Release + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build Windows + run: npx electron-builder --win + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Windows artifact + uses: actions/upload-artifact@v4 + with: + name: windows-build + path: dist/*.exe + + build-macos: + runs-on: macos-latest + strategy: + matrix: + arch: [x64, arm64] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build macOS (${{ matrix.arch }}) + run: npx electron-builder --mac --${{ matrix.arch }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload macOS artifact + uses: actions/upload-artifact@v4 + with: + name: macos-build-${{ matrix.arch }} + path: dist/*-${{ matrix.arch }}.dmg + + build-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build Linux + run: npx electron-builder --linux deb + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload Linux artifact + uses: actions/upload-artifact@v4 + with: + name: linux-build + path: dist/*.deb + + release: + needs: [build-windows, build-macos, build-linux] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + permissions: + contents: write + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: | + artifacts/windows-build/*.exe + artifacts/macos-build-x64/*.dmg + artifacts/macos-build-arm64/*.dmg + artifacts/linux-build/*.deb + generate_release_notes: true + fail_on_unmatched_files: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build/chatecnu.ico b/build/chatecnu.ico index 35e26b6..9f5205b 100644 Binary files a/build/chatecnu.ico and b/build/chatecnu.ico differ diff --git a/build/chatecnu.svg b/build/chatecnu.svg index f5ae42e..9455286 100644 --- a/build/chatecnu.svg +++ b/build/chatecnu.svg @@ -1,6 +1,23 @@ - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/build/favicon.ico b/build/favicon.ico index 6ed99f7..9f5205b 100644 Binary files a/build/favicon.ico and b/build/favicon.ico differ diff --git a/build/icon.png b/build/icon.png new file mode 100644 index 0000000..13a0309 Binary files /dev/null and b/build/icon.png differ diff --git a/build/icons/128x128.png b/build/icons/128x128.png new file mode 100644 index 0000000..9b0ea6b Binary files /dev/null and b/build/icons/128x128.png differ diff --git a/build/icons/16x16.png b/build/icons/16x16.png new file mode 100644 index 0000000..97e2f67 Binary files /dev/null and b/build/icons/16x16.png differ diff --git a/build/icons/256x256.png b/build/icons/256x256.png new file mode 100644 index 0000000..4adda3f Binary files /dev/null and b/build/icons/256x256.png differ diff --git a/build/icons/32x32.png b/build/icons/32x32.png new file mode 100644 index 0000000..4265e88 Binary files /dev/null and b/build/icons/32x32.png differ diff --git a/build/icons/48x48.png b/build/icons/48x48.png new file mode 100644 index 0000000..1d4e249 Binary files /dev/null and b/build/icons/48x48.png differ diff --git a/build/icons/512x512.png b/build/icons/512x512.png new file mode 100644 index 0000000..13a0309 Binary files /dev/null and b/build/icons/512x512.png differ diff --git a/build/icons/64x64.png b/build/icons/64x64.png new file mode 100644 index 0000000..4ca4f37 Binary files /dev/null and b/build/icons/64x64.png differ diff --git a/index.html b/index.html index 00b8d14..545f080 100644 --- a/index.html +++ b/index.html @@ -220,6 +220,12 @@ border: 1px solid #1a1a2e; display: none; } + .refresh-wrapper { + position: relative; + display: flex; + align-items: center; + justify-content: center; + } @keyframes spin { to { transform: rotate(360deg); } } @@ -262,12 +268,15 @@ - +
+ +
+