π Initial commit: Gemini Client Console v1.0.0 #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/build-and-release.yml | |
| name: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Triggers on version tags like v1.0.0 | |
| workflow_dispatch: # Allows manual triggering | |
| inputs: | |
| version: | |
| description: 'Version number (e.g., 1.0.0)' | |
| required: true | |
| type: string | |
| env: | |
| DOTNET_VERSION: '9.0.x' | |
| PROJECT_PATH: 'GeminiClientConsole/GeminiClientConsole.csproj' | |
| SOLUTION_PATH: 'GeminiClient.sln' # Update if your solution has a different name | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| # Windows targets | |
| - os: win-x64 | |
| name: Windows-x64 | |
| extension: .exe | |
| - os: win-x86 | |
| name: Windows-x86 | |
| extension: .exe | |
| - os: win-arm64 | |
| name: Windows-ARM64 | |
| extension: .exe | |
| # Linux targets | |
| - os: linux-x64 | |
| name: Linux-x64 | |
| extension: '' | |
| - os: linux-arm | |
| name: Linux-ARM | |
| extension: '' | |
| - os: linux-arm64 | |
| name: Linux-ARM64 | |
| extension: '' | |
| - os: linux-musl-x64 | |
| name: Linux-Alpine-x64 | |
| extension: '' | |
| # macOS targets | |
| - os: osx-x64 | |
| name: macOS-x64 | |
| extension: '' | |
| - os: osx-arm64 | |
| name: macOS-ARM64 | |
| extension: '' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ env.PROJECT_PATH }} | |
| - name: Build and Publish | |
| run: | | |
| dotnet publish ${{ env.PROJECT_PATH }} \ | |
| --configuration Release \ | |
| --runtime ${{ matrix.os }} \ | |
| --self-contained true \ | |
| --output ./publish/${{ matrix.os }} \ | |
| -p:PublishSingleFile=true \ | |
| -p:PublishTrimmed=true \ | |
| -p:IncludeNativeLibrariesForSelfExtract=true \ | |
| -p:EnableCompressionInSingleFile=true \ | |
| -p:DebugType=None \ | |
| -p:DebugSymbols=false | |
| - name: Rename executable | |
| run: | | |
| if [ "${{ matrix.os }}" = "win-x64" ] || [ "${{ matrix.os }}" = "win-x86" ] || [ "${{ matrix.os }}" = "win-arm64" ]; then | |
| mv ./publish/${{ matrix.os }}/GeminiClientConsole${{ matrix.extension }} \ | |
| ./publish/${{ matrix.os }}/gemini-client-${{ matrix.os }}${{ matrix.extension }} | |
| else | |
| mv ./publish/${{ matrix.os }}/GeminiClientConsole \ | |
| ./publish/${{ matrix.os }}/gemini-client-${{ matrix.os }} | |
| chmod +x ./publish/${{ matrix.os }}/gemini-client-${{ matrix.os }} | |
| fi | |
| - name: Create archive | |
| run: | | |
| cd ./publish/${{ matrix.os }} | |
| if [ "${{ matrix.os }}" = "win-x64" ] || [ "${{ matrix.os }}" = "win-x86" ] || [ "${{ matrix.os }}" = "win-arm64" ]; then | |
| zip -r ../../gemini-client-${{ matrix.os }}.zip . | |
| else | |
| tar -czf ../../gemini-client-${{ matrix.os }}.tar.gz . | |
| fi | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gemini-client-${{ matrix.os }} | |
| path: | | |
| gemini-client-${{ matrix.os }}.zip | |
| gemini-client-${{ matrix.os }}.tar.gz | |
| if-no-files-found: ignore | |
| create-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| - name: Determine version | |
| id: version | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| echo "version=v${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| echo "tag_name=v${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Generate Release Notes | |
| id: release_notes | |
| run: | | |
| cat << EOF > release_notes.md | |
| # Gemini Client Console ${{ steps.version.outputs.version }} | |
| ## π Features | |
| - Interactive model selection from available Gemini models | |
| - Response time tracking and performance metrics | |
| - Session statistics | |
| - Configurable via appsettings.json or environment variables | |
| ## π¦ Installation | |
| ### Windows | |
| 1. Download the appropriate Windows package for your architecture | |
| 2. Extract the ZIP file | |
| 3. Run \`gemini-client-win-x64.exe\` (or your architecture's version) | |
| ### Linux | |
| 1. Download the appropriate Linux package for your architecture | |
| 2. Extract: \`tar -xzf gemini-client-linux-x64.tar.gz\` | |
| 3. Make executable: \`chmod +x gemini-client-linux-x64\` | |
| 4. Run: \`./gemini-client-linux-x64\` | |
| ### macOS | |
| 1. Download the appropriate macOS package for your architecture (x64 for Intel, arm64 for Apple Silicon) | |
| 2. Extract: \`tar -xzf gemini-client-osx-arm64.tar.gz\` | |
| 3. Make executable: \`chmod +x gemini-client-osx-arm64\` | |
| 4. Run: \`./gemini-client-osx-arm64\` | |
| ## βοΈ Configuration | |
| Create an \`appsettings.json\` file in the same directory as the executable: | |
| \`\`\`json | |
| { | |
| "GeminiSettings": { | |
| "ApiKey": "YOUR_API_KEY", | |
| "BaseUrl": "https://generativelanguage.googleapis.com/", | |
| "DefaultModel": "gemini-2.5-flash" | |
| } | |
| } | |
| \`\`\` | |
| Or set environment variables: | |
| - \`GeminiSettings__ApiKey=YOUR_API_KEY\` | |
| - \`GEMINI_DEFAULT_MODEL=gemini-2.5-flash\` | |
| ## π Changelog | |
| See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details. | |
| ## π Known Issues | |
| - Some experimental models may return server errors | |
| - Use stable models like \`gemini-2.5-flash\` for best results | |
| EOF | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag_name }} | |
| name: Gemini Client ${{ steps.version.outputs.version }} | |
| body_path: release_notes.md | |
| draft: false | |
| prerelease: false | |
| files: | | |
| ./artifacts/**/*.zip | |
| ./artifacts/**/*.tar.gz | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |