From b5cdf8413d9c32ddcc095ab9f61056b88ee0cdf4 Mon Sep 17 00:00:00 2001 From: forbes Date: Wed, 28 Jan 2026 07:51:56 -0600 Subject: [PATCH] CI: Add artifact packaging and upload to build workflow - Install to custom prefix for clean packaging - Create versioned tarball with xz compression - Generate SHA256 checksum - Upload artifacts with 30-day retention --- .gitea/workflows/build.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 9641bf950c..a6b6d70fb0 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -85,7 +85,9 @@ jobs: exit $EXITCODE - name: Install - run: pixi run install-release + run: | + # Install to a custom prefix for packaging + pixi run cmake --install build/release --prefix build/release/install - name: Run Python CLI tests timeout-minutes: 10 @@ -94,3 +96,33 @@ jobs: - name: Run GUI tests (headless) timeout-minutes: 10 run: pixi run timeout 300 xvfb-run -a build/release/bin/FreeCAD -t 0 || true + + - name: Package build artifacts + shell: bash + run: | + # Create a distributable tarball from the installed build + ARTIFACT_NAME="kindred-create-$(git describe --tags --always)-linux-x86_64" + echo "Creating artifact: ${ARTIFACT_NAME}" + + # The install step puts files in build/release/install + cd build/release + if [ -d "install" ]; then + mv install "${ARTIFACT_NAME}" + tar -cJf "${ARTIFACT_NAME}.tar.xz" "${ARTIFACT_NAME}" + sha256sum "${ARTIFACT_NAME}.tar.xz" > "${ARTIFACT_NAME}.tar.xz.sha256" + echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV + ls -lh "${ARTIFACT_NAME}.tar.xz" + else + echo "ERROR: install directory not found" + ls -la + exit 1 + fi + + - name: Upload build artifact + uses: https://code.forgejo.org/actions/upload-artifact@v3 + with: + name: ${{ env.ARTIFACT_NAME }} + path: | + build/release/*.tar.xz + build/release/*.sha256 + retention-days: 30