# ZCLAW Release Workflow for Gitea # Builds Tauri application and creates Gitea Release # Triggered by pushing version tags (e.g., v0.2.0) name: Release on: push: tags: - 'v*' env: NODE_VERSION: '20' PNPM_VERSION: '9' RUST_VERSION: '1.78' jobs: # ============================================================================ # Build Tauri Application for Windows # ============================================================================ build-windows: name: Build Windows runs-on: windows-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup pnpm uses: pnpm/action-setup@v4 with: version: ${{ env.PNPM_VERSION }} - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} cache: 'pnpm' - name: Setup Rust uses: dtolnay/rust-action@stable - name: Cache Rust dependencies uses: Swatinem/rust-cache@v2 with: workspaces: | desktop/src-tauri - name: Install frontend dependencies working-directory: desktop run: pnpm install --frozen-lockfile - name: Prepare OpenFang Runtime working-directory: desktop run: pnpm prepare:openfang-runtime - name: Build Tauri application working-directory: desktop run: pnpm tauri:build:bundled - name: Find installer id: find-installer shell: pwsh run: | $installer = Get-ChildItem -Path "desktop/src-tauri/target/release/bundle/nsis" -Filter "*.exe" -Recurse | Select-Object -First 1 echo "INSTALLER_PATH=$($installer.FullName)" >> $env:GITEA_OUTPUT echo "INSTALLER_NAME=$($installer.Name)" >> $env:GITEA_OUTPUT - name: Upload artifact uses: actions/upload-artifact@v4 with: name: windows-installer path: ${{ steps.find-installer.outputs.INSTALLER_PATH }} retention-days: 30 # ============================================================================ # Create Gitea Release # ============================================================================ create-release: name: Create Release needs: build-windows runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Download Windows artifact uses: actions/download-artifact@v4 with: name: windows-installer path: ./artifacts - name: Get version from tag id: get_version run: echo "VERSION=${GITEA_REF#refs/tags/}" >> $GITEA_OUTPUT - name: Create Gitea Release uses: actions/gitea-release@v1 with: tag_name: ${{ gitea.ref_name }} name: ZCLAW ${{ steps.get_version.outputs.VERSION }} body: | ## ZCLAW ${{ steps.get_version.outputs.VERSION }} ### Changes - See CHANGELOG.md for details ### Downloads - **Windows**: Download the `.exe` installer below ### System Requirements - Windows 10/11 (64-bit) draft: true prerelease: false files: | ./artifacts/*.exe env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # ============================================================================ # Build Summary # ============================================================================ release-summary: name: Release Summary needs: [build-windows, create-release] runs-on: ubuntu-latest steps: - name: Release Summary run: | echo "## Release Build Complete" echo "" echo "**Tag**: ${{ gitea.ref_name }}" echo "" echo "### Artifacts" echo "- Windows installer uploaded to release" echo "" echo "### Next Steps" echo "1. Review the draft release" echo "2. Update release notes if needed" echo "3. Publish the release when ready"