Skip to content

fix(ci): restore release documentation publishing - #1424

Open
dlkakbs wants to merge 1 commit into
ProjectOpenSea:mainfrom
dlkakbs:fix/docs-release-workflow
Open

dlkakbs wants to merge 1 commit into
ProjectOpenSea:mainfrom
dlkakbs:fix/docs-release-workflow

Conversation

@dlkakbs

@dlkakbs dlkakbs commented Oct 14, 2026

Copy link
Copy Markdown

Motivation

The documentation publishing workflow cannot currently copy documentation for a release.

The workflow listens for release: created, then requires:

if: github.ref == 'refs/heads/main'

For release-triggered workflows, GitHub sets github.ref to the release tag (refs/tags/<tag_name>), not the release's target branch. As a result, the copy step can never satisfy the existing condition.

This is visible with the repository's 1.6 release:

  • github.ref: refs/tags/1.6
  • target_commitish: main
  • Existing condition result: false

The workflow was added before the 1.6 release, but its Actions history contains no runs. Listening for published also ties the workflow to the point at which a release is actually made public, including releases that were prepared as drafts.

The workflow additionally uses actions/checkout@v2, which Actionlint reports as too old for current GitHub Actions runners. The repository's main test workflow already uses actions/checkout@v5.

GitHub documents release refs here:
https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#release

Solution

  • Trigger the workflow when a release is published.
  • Check github.event.release.target_commitish == 'main' instead of comparing the release tag ref to a branch ref.
  • Upgrade actions/checkout from v2 to v5, matching the repository's test workflow.

Behavior change

A published release targeting main will now run the documentation copy step.

Releases targeting another branch will continue to skip the copy step.

This change only affects the documentation publishing workflow. It does not modify contracts, dependencies, tests, or runtime behavior.

Tests

  • actionlint v1.7.7 .github/workflows/docs.yml
  • YAML parse validation
  • git diff --check
  • Verified the condition against the real 1.6 release metadata:
    • Tag: 1.6
    • Simulated release ref: refs/tags/1.6
    • Target branch: main
    • Existing condition: false
    • Updated condition: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant