openpencil/.github/workflows/rust-release.yml

61 lines
2.6 KiB
YAML

name: Rust release artifacts
# Triggered on tag push (v*) — assembles a GitHub Release draft. The desktop
# binary build job has been removed: the `openpencil-app` placeholder crate
# was deleted in Phase 1 Task 1.2, and real desktop apps (DMG / AppImage / EXE
# installer) arrive in Step 1f as new `op-*` crates that will reintroduce a
# build matrix here. The wasm web bundle is currently DEFERRED (see comment
# block below); when the CI-side C-hard pipeline (emscripten install + EMSDK +
# symlink hack + wasm-bindgen + wasm-opt) lands it will re-enter the matrix.
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
# Phase 1b release wasm artifact: explicitly DEFERRED (not silently
# dropped). The local C-hard pipeline (vendor/skia-safe-op fork +
# crates/wasm-libc-shim) does produce a runtime-loadable
# wasm32-unknown-unknown bundle today (verified 2026-05-09: 0 env.*
# imports, 597 KiB gzip). Re-introducing the release job requires
# CI-side automation that we have NOT yet built:
# 1. install brew emscripten 5.0.7 + EMSDK shim on ubuntu-latest
# 2. set EMSDK env var for the cargo build
# 3. run `cargo build … --features skia --release`
# 4. apply the `.wasm.a` → `.a` symlink hack in the
# skia-bindings out/ dir (manual today; tracked as a follow-up
# automation item — fold into `vendor/skia-safe-op` build.rs)
# 5. run `wasm-bindgen --target web` + `wasm-opt -Oz`
# 6. browser-side manual smoke (Phase E in spec) before publishing
#
# Until that pipeline lands, tagged releases ship desktop artifacts
# only. This is a CONSCIOUS choice — see plan §Cheat-sheet for the
# tracking item.
release-draft:
name: Create / update GitHub Release draft
# Desktop `build` job removed with the `openpencil-app` placeholder
# crate (Phase 1 Task 1.2); the `wasm` job is deferred (see comment
# block above). When the Step 1f `op-*` desktop crates and the
# CI-side C-hard pipeline land, re-add those jobs and list their
# names in this `needs:` field.
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
- name: Flatten artifacts
run: |
mkdir -p release-files
find dist -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec cp {} release-files/ \;
ls -la release-files
- name: Create / update GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: release-files/*
generate_release_notes: true