v0.0.85-1 #16
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
| name: Release CLI | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-upload: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: linux | |
| asset_name: chithi-cli-linux-amd64 | |
| build_cmd: nuitka-linux | |
| - os: windows-latest | |
| target: windows | |
| asset_name: chithi-cli-windows-amd64.exe | |
| build_cmd: nuitka-windows | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| working-directory: ./src/cli | |
| run: uv sync --frozen | |
| - name: Build binary | |
| working-directory: ./src/cli | |
| run: uv run poe ${{ matrix.build_cmd }} | |
| - name: Rename Artifact (Linux) | |
| if: runner.os == 'Linux' | |
| working-directory: ./src/cli | |
| run: | | |
| if [ -f "app.bin" ]; then | |
| mv app.bin ${{ matrix.asset_name }} | |
| elif [ -f "app" ]; then | |
| mv app ${{ matrix.asset_name }} | |
| else | |
| echo "Build artifact not found!" | |
| exit 1 | |
| fi | |
| - name: Rename Artifact (Windows) | |
| if: runner.os == 'Windows' | |
| working-directory: ./src/cli | |
| run: | | |
| if (Test-Path "app.exe") { | |
| Move-Item -Path "app.exe" -Destination "${{ matrix.asset_name }}" | |
| } else { | |
| Write-Error "Build artifact not found!" | |
| exit 1 | |
| } | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: src/cli/${{ matrix.asset_name }} |