diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7dee897..8cbe72e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,9 +38,6 @@ jobs: - name: Generate bindings run: wails3 generate bindings - - name: Generate icons - run: wails3 generate icons -input build/appicon.png -windowsDir build/windows -macDir build/darwin - - name: Generate syso working-directory: build run: wails3 generate syso -arch amd64 -icon windows/icon.ico -manifest windows/wails.exe.manifest -info windows/info.json -out ../wails_windows_amd64.syso @@ -67,11 +64,8 @@ jobs: name: gitpilot-windows-amd64 path: bin/gitpilot-windows-amd64.zip - build-macos: + build-macos-arm64: runs-on: macos-latest - strategy: - matrix: - arch: [amd64, arm64] steps: - uses: actions/checkout@v4 @@ -99,14 +93,11 @@ jobs: - name: Generate bindings run: wails3 generate bindings - - name: Generate icons - run: wails3 generate icons -input build/appicon.png -windowsDir build/windows -macDir build/darwin - - name: Build env: CGO_ENABLED: 1 GOOS: darwin - GOARCH: ${{ matrix.arch }} + GOARCH: arm64 CGO_CFLAGS: "-mmacosx-version-min=10.15" CGO_LDFLAGS: "-mmacosx-version-min=10.15" MACOSX_DEPLOYMENT_TARGET: "10.15" @@ -124,13 +115,72 @@ jobs: - name: Package run: | cd bin - zip -r gitpilot-macos-${{ matrix.arch }}.zip gitpilot.app config.yaml + zip -r gitpilot-macos-arm64.zip gitpilot.app - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: gitpilot-macos-${{ matrix.arch }} - path: bin/gitpilot-macos-${{ matrix.arch }}.zip + name: gitpilot-macos-arm64 + path: bin/gitpilot-macos-arm64.zip + + build-macos-amd64: + runs-on: macos-13 + steps: + - uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Wails CLI + run: go install github.com/wailsapp/wails/v3/cmd/wails3@latest + + - name: Install frontend dependencies + run: npm install + working-directory: frontend + + - name: Build frontend + run: npm run generate + working-directory: frontend + + - name: Generate bindings + run: wails3 generate bindings + + - name: Build + env: + CGO_ENABLED: 1 + GOOS: darwin + GOARCH: amd64 + CGO_CFLAGS: "-mmacosx-version-min=10.15" + CGO_LDFLAGS: "-mmacosx-version-min=10.15" + MACOSX_DEPLOYMENT_TARGET: "10.15" + run: go build -tags "production,disable_onnx" -trimpath -buildvcs=false -ldflags="-w -s" -o bin/gitpilot + + - name: Create .app bundle + run: | + mkdir -p bin/gitpilot.app/Contents/{MacOS,Resources} + cp build/darwin/icons.icns bin/gitpilot.app/Contents/Resources/ + cp bin/gitpilot bin/gitpilot.app/Contents/MacOS/ + cp config.yaml bin/gitpilot.app/Contents/MacOS/config.yaml + cp build/darwin/Info.plist bin/gitpilot.app/Contents/ + codesign --force --deep --sign - bin/gitpilot.app + + - name: Package + run: | + cd bin + zip -r gitpilot-macos-amd64.zip gitpilot.app + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: gitpilot-macos-amd64 + path: bin/gitpilot-macos-amd64.zip build-linux: runs-on: ubuntu-latest @@ -166,9 +216,6 @@ jobs: - name: Generate bindings run: wails3 generate bindings - - name: Generate icons - run: wails3 generate icons -input build/appicon.png -windowsDir build/windows -macDir build/darwin - - name: Build env: CGO_ENABLED: 1 @@ -191,7 +238,7 @@ jobs: path: bin/gitpilot-linux-amd64.tar.gz release: - needs: [build-windows, build-macos, build-linux] + needs: [build-windows, build-macos-arm64, build-macos-amd64, build-linux] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..44dca01 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +*.syso +.task/ +actions_log.zip +actions_logs/ diff --git a/.task/checksum/common-install-frontend-deps b/.task/checksum/common-install-frontend-deps deleted file mode 100644 index 9e3ae24..0000000 --- a/.task/checksum/common-install-frontend-deps +++ /dev/null @@ -1 +0,0 @@ -c9e4d012d15abf06367f9dcb35fbde1a diff --git a/.task/checksum/generate-bindings--BUILD_FLAGS--buildvcs-false--gcflags-all---l-- b/.task/checksum/generate-bindings--BUILD_FLAGS--buildvcs-false--gcflags-all---l-- deleted file mode 100644 index b20b9d5..0000000 --- a/.task/checksum/generate-bindings--BUILD_FLAGS--buildvcs-false--gcflags-all---l-- +++ /dev/null @@ -1 +0,0 @@ -e4fca8850949396013f268b14abf0d8a diff --git a/.task/checksum/windows-common-generate-icons b/.task/checksum/windows-common-generate-icons deleted file mode 100644 index faec733..0000000 --- a/.task/checksum/windows-common-generate-icons +++ /dev/null @@ -1 +0,0 @@ -9717dac68ebaaaeee7334acd18992d68 diff --git a/.task/checksum/windows-common-install-frontend-deps b/.task/checksum/windows-common-install-frontend-deps deleted file mode 100644 index 9e3ae24..0000000 --- a/.task/checksum/windows-common-install-frontend-deps +++ /dev/null @@ -1 +0,0 @@ -c9e4d012d15abf06367f9dcb35fbde1a diff --git a/bin/config.yaml b/bin/config.yaml deleted file mode 100644 index 953c9f0..0000000 --- a/bin/config.yaml +++ /dev/null @@ -1,41 +0,0 @@ -platforms: - gitea: - base_url: http://192.168.1.10:3000 - users: [] - gitee: - base_url: "" - users: - - username: zhuyuj - token: "" - projects: [] - github: - base_url: "" - users: - - username: zhuy1228 - token: "" - projects: - - name: GitPilot - path: F:\Project\GitPilot - enabled: false - - name: nakama - path: F:\Project\nakama - enabled: false - - name: DevPack - path: F:\Project\DevPack - enabled: false - - name: go-desk-service - path: F:\Project\go-desk\go-desk-service - enabled: false - - name: go-desk-wails - path: F:\Project\go-desk\go-desk-wails - enabled: false - - name: go-game - path: F:\Project\go-game - enabled: false - - name: PeterAgent - path: F:\Project\PeterAgent - enabled: false -settings: - concurrency: 6 - network_check: true - log_level: info diff --git a/bin/gitpilot.exe b/bin/gitpilot.exe deleted file mode 100644 index ee6cac5..0000000 Binary files a/bin/gitpilot.exe and /dev/null differ diff --git a/config.yaml b/config.yaml index 9d86cc3..953c9f0 100644 --- a/config.yaml +++ b/config.yaml @@ -1,40 +1,41 @@ platforms: - github: - users: - - username: "zz_main" - token: "" # 可选:未来扩展 API 功能 - projects: - - name: "projectA" - path: "F:/Projects/github/projectA" - - name: "projectB" - path: "F:/Projects/github/projectB" - - - username: "zz_work" - token: "" - projects: - - name: "work-tool" - path: "F:/Projects/github/work-tool" - - gitee: - users: - - username: "zz_gitee" - token: "" - projects: - - name: "gitee-demo" - path: "F:/Projects/gitee/demo" - gitea: - base_url: "http://192.168.1.10:3000" + base_url: http://192.168.1.10:3000 + users: [] + gitee: + base_url: "" users: - - username: "admin" + - username: zhuyuj + token: "" + projects: [] + github: + base_url: "" + users: + - username: zhuy1228 token: "" projects: - - name: "gitea-app" - path: "F:/Projects/gitea/app" - - name: "gitea-service" - path: "F:/Projects/gitea/service" - + - name: GitPilot + path: F:\Project\GitPilot + enabled: false + - name: nakama + path: F:\Project\nakama + enabled: false + - name: DevPack + path: F:\Project\DevPack + enabled: false + - name: go-desk-service + path: F:\Project\go-desk\go-desk-service + enabled: false + - name: go-desk-wails + path: F:\Project\go-desk\go-desk-wails + enabled: false + - name: go-game + path: F:\Project\go-game + enabled: false + - name: PeterAgent + path: F:\Project\PeterAgent + enabled: false settings: concurrency: 6 network_check: true - log_level: "info" + log_level: info