Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
Merge origin/main: .mcpb bundles attested too; check_workflows: attested paths == uploaded paths
islandmed984e6f0e6ca7
diff --cc .github/workflows/packages.ymlindex 80fcdb3e,a1ad567c..d929d26d--- a/.github/workflows/packages.yml+++ b/.github/workflows/packages.yml@@@ -163,14 -159,6 +166,15 @@@ jobsbuild/*.tar.gzbuild/*.AppImagebuild/*.AppImage.zsync+ retention-days: 14+ - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2+ with:+ subject-path: |+ build/*.deb+ build/*.tar.gz+ build/*.AppImage+ build/*.AppImage.zsync++ build/*.mcpb# Built in the freedesktop SDK (packaging/flatpak/build.sh), installed, and UI tests run inside the sandbox.flatpak:@@@ -383,11 -351,9 +389,15 @@@- uses: actions/upload-artifact@v7with:name: macos- path: build/*.dmg+ path: |+ build/*.dmg+ build/*.mcpb+ retention-days: 14+ - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2+ with:- subject-path: build/*.dmg++ subject-path: |++ build/*.dmg++ build/*.mcpbwindows:name: Windows x64 (installer, .zip)@@@ -453,30 -417,4 +465,32 @@@path: |build/*.exebuild/*.zip+ build/*.mcpb+ retention-days: 14+ - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2+ with:+ subject-path: |+ build/*.exe+ build/*.zip++ build/*.mcpb++ # The SHA-256 of every package this run built, as an artifact of its own: release.yml publishes these files only if+ # each one still has exactly this checksum and its attestation (tools/release/verify_staged.py).+ sums:+ name: Record checksums+ needs: [linux, flatpak, vfx, macos, windows]+ # Explicit: job reuse is skipped outside a push to main, and a skipped ancestor would skip this job too.+ if: ${{ !cancelled() && needs.linux.result == 'success' && needs.flatpak.result == 'success' && needs.vfx.result == 'success' && needs.macos.result == 'success' && needs.windows.result == 'success' }}+ runs-on: ubuntu-24.04+ steps:+ - uses: actions/download-artifact@v8+ with:+ path: dist+ merge-multiple: true+ pattern: '{linux,flatpak,vfx,macos,windows}*'+ - run: cd dist && sha256sum * > ../SHA256SUMS.staged.txt && cat ../SHA256SUMS.staged.txt+ - uses: actions/upload-artifact@v7+ with:+ name: staged-sums+ path: SHA256SUMS.staged.txt+ retention-days: 14diff --cc .github/workflows/release.ymlindex c8c39835,f58258f2..c8347c1a--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@@ -3,20 -3,15 +3,22 @@@ name: Releas# A v* tag publishes a GitHub release (docs/releasing.md has the whole process; scripts/release.sh drives it).## locate the tagged commit must carry the version the tag names (CMakeLists.txt's version, plus its-# SCULPTFORGE_PRERELEASE for a beta: v0.11.0-beta.1 tags 0.11.0 with "beta.1"). If CI succeeded on a push to-# main for exactly this commit and the Packages workflow (packages.yml) succeeded for it, on `staging` (the-# release batch carried the bump) or on that push, the release uses those packages: built and tested once,-# promoted unchanged. Otherwise:-# build the Packages workflow runs here, from the tag (compiler cache restored from main, never saved).+# SCULPTFORGE_PRERELEASE for a beta: v0.11.0-beta.1 tags 0.11.0 with "beta.1"). When the Packages workflow+# (packages.yml) ran on a maintainer's push to `staging` for exactly this commit (scripts/release.sh --stage),+# the release promotes that run's packages unchanged: built and tested once. tools/release/staged_run.py+# picks it (push event, branch, actor, success, at most 7 days old, artifacts present) and refuses the+# release if no such run qualifies; CI must have passed on main for the commit. With no staging run at all:+# build the Packages workflow runs here, from the tag (compiler cache restored from main, never saved): the+# --rebuild path.+# verify every package's SHA-256 is the one its run recorded (packages.yml job sums) and its GitHub artifact+# attestation names packages.yml, this commit and that run (and, promoted, a push to staging):+# tools/release/verify_staged.py. Any mismatch refuses the release.# smoke every package installed or unpacked on a fresh runner: the app opens a model and sculpts- # (tests/ui/release_smoke.sfui), sculptforge-cli opens, sculpts, saves and reopens (tests/release_smoke.py).+ # (tests/ui/release_smoke.sfui), sculptforge-cli opens, sculpts, saves and reopens and its MCP server answers+ # (tests/release_smoke.py), also through the AppImage (AppRun --cli) and each unpacked .mcpb bundle.-# publish only after every smoke test passed: checksums, notes from CHANGELOG.md, the GitHub release. A tag with+# publish only after verify and every smoke test passed (environment `release`, the only holder of- # UPDATE_SIGNING_KEY besides member-release: tags v* only): checksums re-checked, signed, notes from CHANGELOG.md, the GitHub release. A tag with++# UPDATE_SIGNING_KEY besides member-release: tags v* only): checksums re-checked, signed, notes from++# CHANGELOG.md, the GitHub release. A tag with# a '-' (a beta) is a member perk, published by publish-members instead: a pre-release in the private# repository islandmed/sculptforge-insiders (INSIDERS_REPO_TOKEN, held only by the environment# member-release: v* tags only, maintainer approval) with CHANGELOG's [Unreleased] notes, and posted indiff --cc tools/release/check_workflows.pyindex 1654be36,40a1c1a4..461a3600--- a/tools/release/check_workflows.py+++ b/tools/release/check_workflows.py@@@ -58,6 -50,6 +58,24 @@@ def environment(lines)return None++def paths(body, key):++ """The globs of `key:` (path / subject-path) in the job's upload-artifact / attest step: inline or a `|` block."""++ want = "upload-artifact" if key == "path" else "attest-build-provenance"++ out, lines = set(), "\n".join(s for s in re.split(r"\n(?=\s*- )", body) if want in s).splitlines()++ for i, line in enumerate(lines):++ m = re.match(rf"^(\s+){key}:\s*(.*?)\s*$", line)++ if not m:++ continue++ if m.group(2) and m.group(2) != "|":++ out.add(m.group(2))++ continue++ for nxt in lines[i + 1:]:++ if len(nxt) - len(nxt.lstrip()) <= len(m.group(1)) or not nxt.strip():++ break++ out.add(nxt.strip())++ return out++++def check(files):"""files: {name: text}. Returns the list of problems."""errs = []@@@ -67,16 -59,6 +85,19 @@@for job, lines in jobs(text).items():if any(TOKEN in l for l in lines) and not environment(lines):errs.append(f"{name}: job {job} reads INSIDERS_REPO_TOKEN outside a GitHub Environment")+ if any(SIGNING in l for l in lines) and environment(lines) not in SIGNING_ENVS:+ errs.append(f"{name}: job {job} reads UPDATE_SIGNING_KEY outside the environments release / member-release")+ pk = files.get("packages.yml")+ if pk is not None:+ if "secrets." in pk:+ errs.append("packages.yml: reads a secret (staging builds must never see one; signing happens at promotion)")+ for job, lines in jobs(pk).items():+ body = "\n".join(lines)+ if job != "sums" and "upload-artifact" in body and not ATTEST.search(body):+ errs.append(f"packages.yml: job {job} uploads packages without a pinned actions/attest-build-provenance step")++ elif job != "sums" and "upload-artifact" in body and paths(body, "path") != paths(body, "subject-path"):++ errs.append(f"packages.yml: job {job} attests {sorted(paths(body, 'subject-path'))} but uploads {sorted(paths(body, 'path'))}"++ " (verify refuses an unattested file)")rel = files.get("release.yml")if rel is None:return errs + ["release.yml: missing"]@@@ -151,20 -106,6 +172,28 @@@ jobsGH_TOKEN: ${{ secrets.INSIDERS_REPO_TOKEN }}run: gh release create"""+PACKAGES = """on:+ push:+ branches: [main, staging]+jobs:+ linux:+ permissions:+ id-token: write+ steps:+ - uses: actions/upload-artifact@v7++ with:++ path: |++ build/*.deb++ build/*.mcpb+ - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2++ with:++ subject-path: |++ build/*.deb++ build/*.mcpb+ sums:+ steps:+ - uses: actions/upload-artifact@v7+"""def self_test():@@@ -173,16 -114,6 +202,17 @@@"unpinned": ({"release.yml": GOOD.replace("checkout@3d3c42e5aac5ba805825da76410c181273ba90b1", "checkout@v7")}, 1),"short sha": ({"release.yml": GOOD.replace("3d3c42e5aac5ba805825da76410c181273ba90b1", "3d3c42e")}, 1),"no environment": ({"release.yml": GOOD.replace(" environment: member-release\n", "")}, 1),+ "packages good": ({"release.yml": GOOD, "packages.yml": PACKAGES}, 0),+ "packages unattested": ({"release.yml": GOOD, "packages.yml": PACKAGES.replace("attest-build-provenance", "x")}, 1),+ "packages attest unpinned": ({"release.yml": GOOD, "packages.yml": PACKAGES.replace("@4d101475d8b20a2381f78447822ac1eab6504dd8", "@v4")}, 1),++ "packages attests less": ({"release.yml": GOOD, "packages.yml": PACKAGES.replace(" build/*.mcpb\n sums:", " sums:")}, 1),+ "packages secret": ({"release.yml": GOOD, "packages.yml": PACKAGES + " env: { K: '${{ secrets.X }}' }\n"}, 1),+ "signing key outside env": ({"release.yml": GOOD.replace(" environment: release\n", "")}, 1),+ "signing key at repo level elsewhere": ({"release.yml": GOOD, "x.yml": f"jobs:\n a:\n env:\n K: ${{{{ {SIGNING} }}}}\n"}, 1),+ "no staged_run": ({"release.yml": GOOD.replace("staged_run.py", "x.py")}, 1),+ "no verify job": ({"release.yml": GOOD.replace(" verify:\n", " check:\n")}, 1),+ "publish without verify": ({"release.yml": GOOD.replace("needs: [locate, build, verify, smoke]\n environment: release", "needs: [locate, build, smoke]\n environment: release")}, 1),+ "members without re-check": ({"release.yml": GOOD.replace(" - run: python3 tools/release/verify_staged.py dist sums --sums-only\n - name: Publish", " - name: Publish")}, 1),"other environment": ({"release.yml": GOOD.replace("member-release", "production")}, 1),"write token": ({"release.yml": GOOD.replace(" contents: read\n steps", " contents: write\n steps")}, 1),"not beta-only": ({"release.yml": GOOD.replace("contains(needs.locate.outputs.tag, '-')", "true")}, 1),