From 4d3ac2263a6fed90f87bf97e95bc79e47b930f50 Mon Sep 17 00:00:00 2001 From: David Jeong Date: Sun, 27 Oct 2024 12:06:24 +0900 Subject: [PATCH] Fix build errors - Fix `package.json` to include missing dependencies - Fix the error TS6133 by removing unused `React` import - Update release workflow to handle .dmg file renaming --- .github/workflows/release.yml | 28 +++++++++------------------- package.json | 2 ++ src/App.tsx | 2 +- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e366e8d..01946cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: with: profile: minimal override: true - + - name: Add binary sources run: | rustup target add aarch64-apple-darwin @@ -67,24 +67,14 @@ jobs: ${{ runner.os }}-cargo-build- - name: Build application - run: npm run tauri build -- universal-apple-darwin - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: colima-gui-macos - path: src-tauri/target/release/bundle/dmg/*.dmg - if-no-files-found: error + run: npm run tauri build -- --target universal-apple-darwin - release: - runs-on: ubuntu-latest - needs: build - - steps: - - name: Download artifact from build - uses: actions/download-artifact@v4 + - name: Glob match + uses: tj-actions/glob@v22 + id: glob with: - name: colima-gui-macos + files: | + **/*.dmg - name: Create release id: create_release @@ -105,6 +95,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: src-tauri/target/release/bundle/dmg/*.dmg - asset_name: colima-gui-macos-${{ github.ref }}.dmg + asset_path: ${{ steps.glob.outputs.paths }} + asset_name: colima-gui-macos-${{ github.ref_name }}.dmg asset_content_type: application/x-apple-diskimage diff --git a/package.json b/package.json index f4b6b3d..89c00ae 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "tauri": "tauri" }, "dependencies": { + "@emotion/styled": "^11.13.0", + "@mui/material": "^6.1.5", "@tauri-apps/api": "^1.5.6", "ansi-to-react": "^6.1.6", "react": "^17.0.2", diff --git a/src/App.tsx b/src/App.tsx index d2b55d3..3f0fca6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef } from 'react'; +import { useState, useEffect, useRef } from 'react'; import './App.css'; import { invoke } from '@tauri-apps/api/tauri'; import { listen } from '@tauri-apps/api/event';