Skip to content

fix(ci): build ferrflow from source instead of downloading from releases - #200

Merged
BryanFRD merged 1 commit into
mainfrom
fix/ci-build-from-source
Apr 1, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/ci-build-from-source

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

The release job used FerrFlow-Org/ferrflow@v2 which downloads the latest release binary. When a new release is created, there's a race condition where the binary assets aren't uploaded yet (404).

  • Build ferrflow from source (cargo build --release) in the CI release job
  • Add floatingTags: ["major"] to .ferrflow so ferrflow handles the vX floating tag natively
  • Remove the manual update-major-tag job from release.yml (redundant with floatingTags)

Closes #199

Copilot AI review requested due to automatic review settings April 1, 2026 07:42
@codecov

codecov Bot commented Apr 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a CI circular dependency by building ferrflow from source during the CI release job (instead of downloading the latest release asset), and switches major-tag handling to FerrFlow’s native floating tag support.

Changes:

  • Build ferrflow via cargo build --release in the CI release job and run it directly.
  • Add floatingTags: ["major"] to .ferrflow so FerrFlow manages the vX floating tag.
  • Remove the redundant update-major-tag job from the release workflow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/ci.yml Builds FerrFlow from source and invokes the local binary during the release job.
.github/workflows/release.yml Removes the manual major-tag moving job.
.ferrflow Enables native major floating tag management via floatingTags.

Comment thread .github/workflows/ci.yml
env:
FERRFLOW_HMAC_SECRET: ${{ secrets.FERRFLOW_HMAC_SECRET }}
- name: Run ferrflow release
run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

The inputs.dry_run == 'true' expression is likely incorrect for a boolean workflow_dispatch input, and inputs may be undefined on non-dispatch runs (push to main). This can cause the step to always skip --dry-run or even fail expression evaluation on push. Prefer checking github.event_name == 'workflow_dispatch' && inputs.dry_run (or github.event.inputs.dry_run) and pass --dry-run based on that boolean directly.

Suggested change
run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release
run: ./target/release/ferrflow ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run && '--dry-run' || '' }} release

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +119 to 124
FERRFLOW_HMAC_SECRET: ${{ secrets.FERRFLOW_HMAC_SECRET }}
- name: Run ferrflow release
run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release
env:
FERRFLOW_TOKEN: ${{ secrets.FERRFLOW_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FERRFLOW_TOKEN }}

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

FERRFLOW_HMAC_SECRET is read via option_env! (compile-time), so setting it during cargo build --release bakes the secret into the produced binary and (with Swatinem/rust-cache) into the GitHub Actions cache. To avoid leaking a long-lived secret into cached artifacts, don’t provide this secret at compile time; instead disable telemetry in CI (e.g. set FERRFLOW_ANONYMOUS_TELEMETRY=false) or change the code to read the secret at runtime via std::env::var.

Suggested change
FERRFLOW_HMAC_SECRET: ${{ secrets.FERRFLOW_HMAC_SECRET }}
- name: Run ferrflow release
run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release
env:
FERRFLOW_TOKEN: ${{ secrets.FERRFLOW_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FERRFLOW_TOKEN }}
FERRFLOW_ANONYMOUS_TELEMETRY: "false"
- name: Run ferrflow release
run: ./target/release/ferrflow ${{ inputs.dry_run == 'true' && '--dry-run' || '' }} release
env:
FERRFLOW_TOKEN: ${{ secrets.FERRFLOW_TOKEN }}
GITHUB_TOKEN: ${{ secrets.FERRFLOW_TOKEN }}
FERRFLOW_ANONYMOUS_TELEMETRY: "false"

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
with:
dry_run: ${{ inputs.dry_run }}
- name: Build ferrflow
run: cargo build --release

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

cargo build --release will build all workspace members (including ferrflow-wasm) and extra bins, which adds time and increases the chance of unrelated build breakage in the release workflow. Consider restricting the build to the CLI binary needed here (e.g., build the ferrflow package/bin only) to keep this job focused and faster.

Suggested change
run: cargo build --release
run: cargo build --release --package ferrflow --bin ferrflow

Copilot uses AI. Check for mistakes.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Benchmark

Details
Benchmark suite Current: 3ded13a Previous: 6b3eb4f Ratio
commit_parsing/100 17602 ns/iter (± 1387) 17600 ns/iter (± 108) 1.00
commit_parsing/1000 175864 ns/iter (± 2242) 175571 ns/iter (± 1886) 1.00
commit_parsing/10000 1813671 ns/iter (± 28152) 1830245 ns/iter (± 33662) 0.99
changelog/build_50 7888 ns/iter (± 55) 7873 ns/iter (± 40) 1.00
changelog/build_500 68492 ns/iter (± 728) 67458 ns/iter (± 258) 1.02
version_files/toml_read 8612 ns/iter (± 65) 8623 ns/iter (± 454) 1.00
version_files/toml_write 169404 ns/iter (± 17470) 134696 ns/iter (± 10623) 1.26
version_files/json_read 5454 ns/iter (± 50) 5431 ns/iter (± 24) 1.00
version_files/json_write 159995 ns/iter (± 19056) 130082 ns/iter (± 7209) 1.23
version_files/xml_read 5177 ns/iter (± 26) 5204 ns/iter (± 57) 0.99
version_files/xml_write 160535 ns/iter (± 17500) 173648 ns/iter (± 21955) 0.92
version_files/gradle_read 5023 ns/iter (± 59) 5083 ns/iter (± 72) 0.99
version_files/gradle_write 172459 ns/iter (± 26289) 131386 ns/iter (± 8188) 1.31
config_loading/single 10423 ns/iter (± 581) 10549 ns/iter (± 90) 0.99
config_loading/mono_10 16120 ns/iter (± 744) 15698 ns/iter (± 188) 1.03
config_loading/mono_50 41116 ns/iter (± 2469) 41010 ns/iter (± 479) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 3ded13a Previous: 6b3eb4f Ratio
version_files/toml_write 169404 ns/iter (± 17470) 134696 ns/iter (± 10623) 1.26
version_files/json_write 159995 ns/iter (± 19056) 130082 ns/iter (± 7209) 1.23
version_files/gradle_write 172459 ns/iter (± 26289) 131386 ns/iter (± 8188) 1.31

This comment was automatically generated by workflow using github-action-benchmark.

@BryanFRD
BryanFRD merged commit 93c445a into main Apr 1, 2026
15 checks passed
@BryanFRD
BryanFRD deleted the fix/ci-build-from-source branch April 1, 2026 07:50
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.

CI release job downloads from releases, causing 404 on new versions

2 participants