Skip to content

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Jan 20, 2026

  • Create reusable workflows for building examples and generating website
  • Download and attach artifacts as zip files to the draft release
  • Update release documentation to reflect the automation

This eliminates manual steps for attaching release assets.

Notes

Closes #859
Covers #889

Remaining Tasks

Summary by CodeRabbit

  • New Features

    • Reusable CI workflows to build examples, Storybook/site assets, and the website; artifacts produced per-runner and selectable by artifact name.
  • Release

    • Release pipeline now derives the version, runs dedicated build jobs (including examples and website), and attaches versioned zip artifacts to GitHub releases.
  • Documentation

    • Updated release and website docs with automatic artifact attachment, version-aware setup, and post-release review guidance.

@tbouffard tbouffard added the chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) label Jan 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Walkthrough

Adds two reusable GitHub Actions workflows for building examples and generating the website; refactors build and generate-website workflows to call those reusables; updates the release workflow to derive VERSION, run the reusable builds, collect artifacts, and attach versioned examples/website archives to the GitHub release. (37 words)

Changes

Cohort / File(s) Summary
Reusable workflows
.github/workflows/_reusable_build_examples.yml, .github/workflows/_reusable_generate_website.yml
Add reusable workflows: build-examples accepts artifact-name and runner; generate-website accepts artifact-name. Both checkout, set up build steps across workspaces (core, examples, storybook/docs), and upload named artifacts.
Build & generation workflows
.github/workflows/build.yml, .github/workflows/generate-website.yml
Swap matrix dimension from osrunner, rename/clarify build steps, upload storybook artifact, and replace inlined website-build steps with calls to the reusable generate-website workflow. Add separate job build_examples that calls the reusable build-examples workflow.
Release workflow
.github/workflows/create-github-release.yml
Add compute_environment_variables job that extracts VERSION; add build_examples and generate_website jobs that call reusables with versioned artifact names; update create_release to depend on these jobs, download/repackage artifacts, and attach versioned examples/website zips to the release.
Docs
packages/website/docs/development/release.md, packages/website/docs/intro.md
Update release docs to reflect automatic attachment of examples/website archives and clarify version-aware website unpack/serve instructions.

Sequence Diagram(s)

sequenceDiagram
    actor TagPush as Tag Push
    participant GHA as GitHub Actions
    participant ComputeEnv as compute_environment_variables
    participant ReusableExamples as build_examples (reusable)
    participant ReusableWebsite as generate_website (reusable)
    participant CreateRelease as create_release
    participant GHRelease as GitHub Release

    TagPush->>GHA: trigger release pipeline
    GHA->>ComputeEnv: extract VERSION from tag
    ComputeEnv-->>GHA: outputs VERSION
    GHA->>ReusableExamples: invoke (artifact-name=examples-VERSION, runner)
    ReusableExamples-->>GHA: upload examples artifact
    GHA->>ReusableWebsite: invoke (artifact-name=website-VERSION or gh-pages)
    ReusableWebsite-->>GHA: upload website artifact
    GHA->>CreateRelease: run create_release (needs: compute + build jobs)
    CreateRelease->>GHA: download artifacts (examples, website)
    CreateRelease->>GHRelease: attach versioned archives and publish release
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: automating the attachment of examples and website assets to GitHub releases, which aligns with the PR's primary objective.
Description check ✅ Passed The PR description provides a summary of changes, references linked issues (#859, #889), documents completed tasks, and explains the purpose. However, it lacks a structured checklist completion as required by the template.
Linked Issues check ✅ Passed The PR successfully implements all main objectives from issue #859: creates reusable workflows for examples and website, automatically attaches artifacts as zip files to release drafts, and updates documentation.
Out of Scope Changes check ✅ Passed All changes directly support the PR objectives: new reusable workflows, modifications to existing CI workflows to use them, and documentation updates reflect the automation. No unrelated changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tbouffard tbouffard changed the title ci: upload website and examples as assets of the GitHub release ci: attach examples and website assets to GitHub releases Jan 22, 2026
@tbouffard tbouffard marked this pull request as ready for review January 22, 2026 17:05
Windows GitHub Actions runners default to PowerShell, which doesn't
properly execute bash scripts. Adding explicit shell: bash ensures
the build script runs correctly on all platforms.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/create-github-release.yml (1)

41-63: Add issues: read permission for milestone GraphQL query.

Querying repository milestones via the GraphQL API requires the issues: read permission. Without it, the gh api graphql call will fail and leave MILESTONE_NUMBER unset.

Proposed fix
  create_release:
    runs-on: ubuntu-24.04
    needs: [compute_environment_variables, build_examples, generate_website]
    permissions:
      contents: write # create the GH release
+     issues: read
♻️ Duplicate comments (1)
.github/workflows/create-github-release.yml (1)

21-35: Add actions: write to reusable-workflow callers for artifact uploads.

The caller permissions cap the reusable workflows. If _reusable_build_examples.yml / _reusable_generate_website.yml upload artifacts, they need actions: write, which is currently missing.

✅ Proposed fix
  build_examples:
    needs: compute_environment_variables
    permissions:
      contents: read
+     actions: write
    uses: ./.github/workflows/_reusable_build_examples.yml
    with:
      artifact-name: 'maxgraph_${{ needs.compute_environment_variables.outputs.version }}_examples.zip'

  generate_website:
    needs: compute_environment_variables
    permissions:
      contents: read
+     actions: write
    uses: ./.github/workflows/_reusable_generate_website.yml
    with:
      artifact-name: 'maxgraph_${{ needs.compute_environment_variables.outputs.version }}_website.zip'

Please verify the reusable workflows actually upload artifacts:

#!/bin/bash
rg -n "actions/(upload-artifact|upload-pages-artifact)" .github/workflows/_reusable_build_examples.yml .github/workflows/_reusable_generate_website.yml

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2026

@tbouffard tbouffard merged commit 083d030 into main Feb 2, 2026
14 checks passed
@tbouffard tbouffard deleted the ci/upload_website_and_examples branch February 2, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate the upload of website and examples archives in release drafts

1 participant