From f3a3fcc0793925969728db69a186e0c80e11341f Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Tue, 4 Aug 2026 20:11:44 +0200 Subject: [PATCH] feat(ci): update workflow for Windows and add Ubuntu publishing The workflow has been modified to focus on building and publishing Windows installers, with the previous matrix strategy removed. Additionally, a new job for building and publishing Ubuntu AppImages has been added, ensuring that the necessary dependencies and steps are included for a successful build. - Renamed job to reflect Windows installer publishing - Added Ubuntu AppImage publishing workflow - Simplified job structure by removing matrix strategy --- .gitea/workflows/app_builder.yaml | 120 ++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 38 deletions(-) diff --git a/.gitea/workflows/app_builder.yaml b/.gitea/workflows/app_builder.yaml index c255442..5f980fd 100644 --- a/.gitea/workflows/app_builder.yaml +++ b/.gitea/workflows/app_builder.yaml @@ -5,7 +5,8 @@ on: types: [published] jobs: - publish-tauri: + publish-windows: + name: Build and publish Windows installer permissions: contents: write environment: production @@ -30,25 +31,7 @@ jobs: run: working-directory: GitLite - strategy: - fail-fast: false - max-parallel: 1 - matrix: - include: - # - platform: 'macos-latest' - # args: '--target aarch64-apple-darwin' - # - platform: 'macos-latest' - # args: '--target x86_64-apple-darwin' - - platform: "windows-latest" - bundles: "nsis" - updater_platform: "windows-x86_64" - no_strip: "" - - platform: "ubuntu-22.04" - bundles: "appimage" - updater_platform: "linux-x86_64" - no_strip: "1" - - runs-on: ${{ matrix.platform }} + runs-on: windows-latest steps: # cicd_tool/main.py expects the repo at /GitLite, so check out there. @@ -56,25 +39,11 @@ jobs: with: path: GitLite - - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-22.04' - run: | - sudo apt-get update - sudo apt-get install -y build-essential curl wget file libssl-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libfuse2 - - name: setup node uses: actions/setup-node@v4 with: node-version: lts/* - - name: Install uv - if: matrix.platform == 'ubuntu-22.04' - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b - - - name: install rust toolchain - if: matrix.platform == 'ubuntu-22.04' - uses: dtolnay/rust-toolchain@stable - - name: install frontend dependencies run: npm ci @@ -88,7 +57,6 @@ jobs: node -e "const fs=require('fs'); const path='src-tauri/tauri.conf.json'; const config=JSON.parse(fs.readFileSync(path,'utf8')); config.version=process.env.RELEASE_VERSION; fs.writeFileSync(path, JSON.stringify(config,null,2)+'\n');" - name: Commit and Push Changes - if: matrix.platform == 'windows-latest' shell: powershell run: | git config user.name '${{ vars.USERNAME_GIT }}' @@ -139,21 +107,22 @@ jobs: env: TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD}} - NO_STRIP: ${{ matrix.no_strip }} - run: npm run tauri -- build --bundles ${{ matrix.bundles }} + NO_STRIP: "" + run: npm run tauri -- build --bundles nsis # ---------------------- # Upload to MinIO (via mc) and create latest.json # ---------------------- - name: Upload artifacts to MinIO with cicd_tool working-directory: GitLite/cicd_tool env: - PUBLISH_PLATFORM: ${{ matrix.updater_platform }} + PUBLISH_PLATFORM: windows-x86_64 run: | uv sync uv run main.py publish-arch: name: Build and publish gitty-desktop to AUR + needs: publish-windows runs-on: archlinux environment: production env: @@ -247,3 +216,78 @@ jobs: git commit -m "Update to $PACKAGE_VERSION" git push origin HEAD:master + + publish-ubuntu: + name: Build and publish Ubuntu AppImage + needs: publish-arch + permissions: + contents: write + environment: production + env: + GITEA_API: https://git.cbsk-tech.de/api/v1 + OWNER: Christoph + REPO: GitLite + GITEA_TOKEN: ${{ secrets.ACTIONS_TOKEN }} + GITEA_FALLBACK_TOKEN: ${{ github.token }} + + MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }} + S3_BUCKET: ${{ vars.S3_BUCKET }} + AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }} + ARTIFACT_BASE_URL: ${{ vars.ARTIFACT_BASE_URL }} + S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} + S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} + + defaults: + run: + working-directory: GitLite + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v5 + with: + path: GitLite + + - name: Install Ubuntu dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential curl wget file libssl-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev libfuse2 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install frontend dependencies + run: npm ci + + - name: Update package.json version + run: npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version + + - name: Update tauri.conf.json version + env: + RELEASE_VERSION: ${{ github.ref_name }} + run: | + node -e "const fs=require('fs'); const path='src-tauri/tauri.conf.json'; const config=JSON.parse(fs.readFileSync(path,'utf8')); config.version=process.env.RELEASE_VERSION; fs.writeFileSync(path, JSON.stringify(config,null,2)+'\n');" + + - name: Build Tauri App + env: + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD}} + NO_STRIP: "1" + run: npm run tauri -- build --bundles appimage + + - name: Upload artifacts to MinIO with cicd_tool + working-directory: GitLite/cicd_tool + env: + PUBLISH_PLATFORM: linux-x86_64 + run: | + uv sync + uv run main.py