Skip to content

feat(action): expose release outputs - #1353

Merged
BryanFRD merged 5 commits into
mainfrom
feat/release-outputs
Oct 26, 2026
Merged

BryanFRD merged 5 commits into
mainfrom
feat/release-outputs

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Summary

ferrflow release can now report whether it released anything and what it tagged, and the action exposes that as released and releases outputs so later steps can gate on it.

- uses: FerrLabs/FerrFlow@v7
  id: release
- name: Publish
  if: steps.release.outputs.released == 'true'
  run: npm publish

Related Issue

Closes #205

Changes

  • ferrflow release --output-format github|dotenv|json with --output-file <PATH>:
    • github appends released= / releases= to $GITHUB_OUTPUT (or --output-file)
    • dotenv writes FERRFLOW_RELEASED / FERRFLOW_RELEASES for GitLab artifacts:reports:dotenv
    • json writes {"released":...,"releases":[...]}
    • releases is [{"name","version","tag"}], built from the tags the run actually created. Dry runs and PR-mode runs that only open the release PR report released=false.
    • A missing destination fails before the release starts.
  • run_release_logic now always returns its output instead of printing on non-dry runs, so release can write the outputs after a successful run (including after push-rejection retries).
  • action.yml: id: ferrflow on the release step, released / releases outputs. When version: pins a binary without --output-format, the step warns and leaves the outputs empty instead of failing.
  • Docs (EN + FR): GitHub Actions page documented a version output that never existed; replaced with the real outputs and gate/monorepo examples. CLI reference, a GitLab dotenv section, and a README snippet.
  • fix(cache): cache entries were named by joining four hashes (~245 bytes); the staging file's .<pid>.tmp suffix pushed it past the 255-byte filename limit on hosts with 7-digit PIDs, so the write failed silently and check never hit its cache. Entries are now named by a hash of the key. Separate commit.

Checklist

  • Tests pass (cargo test)
  • No clippy warnings (cargo clippy)
  • Code is formatted (cargo fmt)
  • Documentation updated (if applicable)

The file name joined four hashes and the variant (about 245 bytes), and the staging file appended .<pid>.tmp. With a seven-digit PID the staging name passed the 255-byte filename limit, the write failed silently, and check never hit its cache. Name entries by a hash of the key instead; old entries age out through the existing prune.

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
Add --output-format github|dotenv|json and --output-file to ferrflow release. They report whether the run created tags and which packages it released, so later CI steps can gate on it. Dry runs and PR-mode runs that only open the release PR report released=false.

The action passes --output-format github and exposes the released and releases outputs.

Closes #205

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Blocking: removing finish() breaks ferrflow shadow-release output. Shadow runs with dry_run: false, so finish used to call out.print() for it. run_shadow_release (src/monorepo/run/mod.rs:108, outside the diff) still ends in .map(|_| ()), so the per-package lines and "Nothing to release." are now dropped without a word, and only the shadow summary gets printed. check and release were moved over to print through the caller, but this third caller was missed. Fix:

run_with_flags(root, config, flags, access, &[], &[], &mut timing).map(|out| out.print())

Everything else checks out. creates_tags() is correct for finalizing (mode None) and resumed releases. Dry-run, shadow and PR-open runs report released=false, and the github and dotenv writers append and truncate as documented.

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
run_release_logic no longer prints on non-dry runs, and run_shadow_release discarded the returned output, so shadow-release lost its per-package lines.

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixed in 32b1d8b: run_shadow_release prints its output again, so the shadow-release output regression from my last review is gone. Nothing new in the merge from main.

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
@BryanFRD
BryanFRD merged commit 5bda89c into main Oct 26, 2026
35 checks passed
@BryanFRD
BryanFRD deleted the feat/release-outputs branch October 26, 2026 18:54
ferrflow Bot added a commit that referenced this pull request Oct 26, 2026
## [7.34.0] - 2026-10-26

### Features

- feat(action): expose release outputs (#1353)
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.

feat(action): expose release outputs (released, releases JSON)

1 participant