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
This commit is contained in:
forbes
2026-01-28 07:51:56 -06:00
parent af173e24ff
commit b5cdf8413d

View File

@@ -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