ci: attach examples and website assets to GitHub releases#996
ci: attach examples and website assets to GitHub releases#996
Conversation
WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
…t not for gh-pages (docusaurus requirements)
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.
There was a problem hiding this comment.
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: Addissues: readpermission for milestone GraphQL query.Querying repository milestones via the GraphQL API requires the
issues: readpermission. Without it, thegh api graphqlcall will fail and leaveMILESTONE_NUMBERunset.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: Addactions: writeto reusable-workflow callers for artifact uploads.The caller permissions cap the reusable workflows. If
_reusable_build_examples.yml/_reusable_generate_website.ymlupload artifacts, they needactions: 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
|



This eliminates manual steps for attaching release assets.
Notes
Closes #859
Covers #889
Remaining Tasks
Summary by CodeRabbit
New Features
Release
Documentation