diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2642728..ab78e67 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,103 +14,58 @@ env: CARGO_TERM_COLOR: always jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Bun - uses: https://github.com/oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Install Node dependencies - run: bun install - - - name: Run type check - run: bun run check - - - name: Install Rust - uses: https://github.com/dtolnay/rust-toolchain@stable - - - name: Cache Rust dependencies - uses: https://github.com/Swatinem/rust-cache@v2 - with: - workspaces: src-tauri - - - name: Check Rust formatting - run: cargo fmt --check --manifest-path src-tauri/Cargo.toml - - - name: Run Rust clippy - run: cargo clippy --manifest-path src-tauri/Cargo.toml -- -D warnings - build-windows: name: Build Windows runs-on: windows-latest - needs: test if: startsWith(github.ref, 'refs/tags/v') steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Bun - uses: https://github.com/oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: bun install - - name: Install Rust - uses: https://github.com/dtolnay/rust-toolchain@stable - - - name: Cache Rust dependencies - uses: https://github.com/Swatinem/rust-cache@v2 + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - workspaces: src-tauri + toolchain: stable - name: Build Tauri app run: bun tauri build - env: - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - name: Upload Windows artifacts - uses: https://github.com/actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: windows-artifacts path: | src-tauri/target/release/bundle/msi/*.msi - src-tauri/target/release/bundle/msi/*.msi.zip - src-tauri/target/release/bundle/msi/*.msi.zip.sig src-tauri/target/release/bundle/nsis/*.exe build-linux: name: Build Linux runs-on: ubuntu-latest - needs: test if: startsWith(github.ref, 'refs/tags/v') steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Bun - uses: https://github.com/oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: bun install - - name: Install Rust - uses: https://github.com/dtolnay/rust-toolchain@stable - - - name: Cache Rust dependencies - uses: https://github.com/Swatinem/rust-cache@v2 + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - workspaces: src-tauri + toolchain: stable - name: Install system dependencies run: | @@ -127,61 +82,47 @@ jobs: - name: Build Tauri app run: bun tauri build - env: - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - name: Upload Linux artifacts - uses: https://github.com/actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: linux-artifacts path: | src-tauri/target/release/bundle/deb/*.deb src-tauri/target/release/bundle/appimage/*.AppImage - src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz - src-tauri/target/release/bundle/appimage/*.AppImage.tar.gz.sig build-macos: name: Build macOS runs-on: macos-latest - needs: test if: startsWith(github.ref, 'refs/tags/v') steps: - name: Checkout code uses: actions/checkout@v4 - name: Setup Bun - uses: https://github.com/oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: bun install - - name: Install Rust - uses: https://github.com/dtolnay/rust-toolchain@stable + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - targets: aarch64-apple-darwin,x86_64-apple-darwin - - - name: Cache Rust dependencies - uses: https://github.com/Swatinem/rust-cache@v2 - with: - workspaces: src-tauri + toolchain: stable + target: aarch64-apple-darwin,x86_64-apple-darwin - name: Build Tauri app (Universal) run: bun tauri build --target universal-apple-darwin - env: - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - name: Upload macOS artifacts - uses: https://github.com/actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: macos-artifacts path: | src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg - src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app.tar.gz - src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app.tar.gz.sig + src-tauri/target/universal-apple-darwin/release/bundle/macos/*.app release: name: Create Release @@ -193,7 +134,7 @@ jobs: uses: actions/checkout@v4 - name: Download all artifacts - uses: https://github.com/actions/download-artifact@v4 + uses: actions/download-artifact@v4 with: path: artifacts @@ -201,61 +142,25 @@ jobs: id: get_version run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT - - name: Generate release notes - id: release_notes - run: | - echo "NOTES<> $GITHUB_OUTPUT - git log $(git describe --tags --abbrev=0 HEAD^)..HEAD --pretty=format:"- %s" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - - name: Create latest.json for updater - run: | - cat > latest.json << EOF - { - "version": "${{ steps.get_version.outputs.VERSION }}", - "notes": "${{ steps.release_notes.outputs.NOTES }}", - "pub_date": "$(date -u +%Y-%m-%dT%H:%M:%SZ)", - "platforms": { - "windows-x86_64": { - "signature": "$(cat artifacts/windows-artifacts/*.msi.zip.sig)", - "url": "https://git.sirblob.co/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/gitea-desktop_${{ steps.get_version.outputs.VERSION }}_x64_en-US.msi.zip" - }, - "linux-x86_64": { - "signature": "$(cat artifacts/linux-artifacts/*.AppImage.tar.gz.sig)", - "url": "https://git.sirblob.co/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/gitea-desktop_${{ steps.get_version.outputs.VERSION }}_amd64.AppImage.tar.gz" - }, - "darwin-universal": { - "signature": "$(cat artifacts/macos-artifacts/*.app.tar.gz.sig)", - "url": "https://git.sirblob.co/${{ github.repository }}/releases/download/v${{ steps.get_version.outputs.VERSION }}/gitea-desktop_${{ steps.get_version.outputs.VERSION }}_universal.app.tar.gz" - } - } - } - EOF - - name: Create Release - uses: https://github.com/softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: name: Release v${{ steps.get_version.outputs.VERSION }} body: | - ## What's Changed - ${{ steps.release_notes.outputs.NOTES }} - ## Downloads - - **Windows**: `.msi` installer + - **Windows**: `.msi` or `.exe` installer - **Linux**: `.deb` or `.AppImage` - **macOS**: `.dmg` or `.app` ## Installation Download the appropriate file for your platform and install it. files: | - artifacts/windows-artifacts/* - artifacts/linux-artifacts/* - artifacts/macos-artifacts/* - latest.json + artifacts/windows-artifacts/**/* + artifacts/linux-artifacts/**/* + artifacts/macos-artifacts/**/* draft: false prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} dev-build: name: Development Build @@ -266,28 +171,24 @@ jobs: uses: actions/checkout@v4 - name: Setup Bun - uses: https://github.com/oven-sh/setup-bun@v1 + uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Install dependencies run: bun install - - name: Install Rust - uses: https://github.com/dtolnay/rust-toolchain@stable - - - name: Cache Rust dependencies - uses: https://github.com/Swatinem/rust-cache@v2 + - name: Setup Rust + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - workspaces: src-tauri + toolchain: stable - - name: Build Tauri app (dev) + - name: Build Tauri app (debug) run: bun tauri build --debug - name: Upload dev build - uses: https://github.com/actions/upload-artifact@v4 + uses: actions/upload-artifact@v4 with: name: dev-build-windows - path: | - src-tauri/target/debug/bundle/**/* + path: src-tauri/target/debug/bundle/**/* retention-days: 7 diff --git a/README.md b/README.md index 1d1a2e6..c6d7402 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,141 @@ -# Gitea-Desktop +# Gitea Desktop -Desktop Application for Gitea \ No newline at end of file +A Gitea desktop application for managing your Gitea repositories + +![License](https://img.shields.io/badge/license-MIT-blue) + +## Features + +- **OAuth Authentication**: Secure login to your Gitea instance +- **Repository Management**: Browse and manage all your repositories +- **Quick Search**: Instantly find repositories by name, owner, or description +- **Dark Theme**: GitHub Desktop-inspired dark interface +- **Cross-platform**: Built with Tauri for native performance on Windows, macOS, and Linux +- **Fast & Lightweight**: Native performance with minimal resource usage +- **Repository Details**: View stars, forks, issues, and repository information +- **Real-time Updates**: Keep track of your repository changes + +## Screenshots + + + +## Installation + +### From Releases + +Download the latest version for your platform from the [releases page](https://git.sirblob.co/SirBlob/Gitea-Desktop/releases): + +- **Windows**: `.msi` or `.exe` installer +- **macOS**: `.dmg` installer +- **Linux**: `.deb`, `.rpm`, or `.AppImage` + +### Building from Source + +**Prerequisites:** +- [Node.js](https://nodejs.org/) (v18 or higher) +- [Bun](https://bun.sh/) or npm +- [Rust](https://rustup.rs/) (for Tauri) + +**Clone and build:** +```bash +git clone https://git.sirblob.co/SirBlob/Gitea-Desktop.git +cd Gitea-Desktop + +# Install dependencies +bun install + +# Run in development mode +bun tauri dev + +# Build for production +bun tauri build +``` + +## Usage + +### First Time Setup + +1. Launch Gitea Desktop +2. Enter your Gitea server URL and personal access token +4. Start managing your repositories! + +### Managing Repositories + +- **Browse Repositories**: View all your repositories in the left sidebar +- **Search**: Use the search bar to quickly find repositories +- **Select Repository**: Click on any repository to view its details +- **Refresh**: Click the refresh button to update your repository list + +### Creating Access Tokens + +If you prefer to use a personal access token instead of OAuth: + +1. Go to your Gitea instance +2. Navigate to Settings → Applications → Generate New Token +3. Give it a name and select appropriate scopes +4. Copy the token and paste it into Gitea Desktop + +## Configuration + +Gitea Desktop stores your authentication securely using the system's credential manager. Your credentials are never stored in plain text. + +## Technology Stack + +- **Frontend**: SvelteKit 5 with Svelte Runes +- **Backend**: Tauri (Rust) +- **Styling**: Tailwind CSS, Skeleton UI +- **Icons**: Iconify + +## Development + +### Available Scripts + +```bash +# Development +bun tauri dev # Run in development mode + +# Building +bun tauri build # Build for production + +# Frontend only +bun run dev # Run SvelteKit dev server +bun run build # Build frontend +``` + +## Contributing + +Contributions are welcome! Please feel free to submit a Pull Request. + +1. Fork the repository +2. Commit your changes (`git commit -m 'Add some AmazingFeature'`) +3. Open a Pull Request + +## Roadmap + +- [ ] Clone repositories directly from the app +- [ ] Create new repositories +- [ ] View commit history +- [ ] Manage branches +- [ ] Pull request management +- [ ] Issue tracking +- [ ] File browser +- [ ] Diff viewer +- [ ] Git operations (commit, push, pull) +- [ ] Multiple account support + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## Acknowledgments + +- Inspired by [GitHub Desktop](https://desktop.github.com/) +- Built with [Tauri](https://tauri.app/) +- UI components from [Skeleton UI](https://skeleton.dev/) + +## Support + +If you encounter any issues or have questions: +- [Report a bug](https://git.sirblob.co/SirBlob/Gitea-Desktop/issues) +- [Request a feature](https://git.sirblob.co/SirBlob/Gitea-Desktop/issues) +- Check the [documentation](https://git.sirblob.co/SirBlob/Gitea-Desktop/wiki) (coming soon) \ No newline at end of file