Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,47 +165,59 @@ jobs:
--bin bid-scraper \
--bin rbuilder-rebalancer

- name: Rename binaries
if: steps.platform-check.outputs.skip != 'true'
env:
VERSION: ${{ needs.extract-version.outputs.VERSION }}
TARGET: ${{ matrix.target }}
FEATURES_SUFFIX: ${{ matrix.features && format('-{0}', matrix.features) || '' }}
run: |
cd target/${{ matrix.profile }}
for bin in rbuilder rbuilder-operator tbv-bidding-service reth-rbuilder bid-scraper rbuilder-rebalancer; do
[ -f "$bin" ] && mv "$bin" "${bin}-${VERSION}-${TARGET}${FEATURES_SUFFIX}"
done

- name: Upload rbuilder artifact
if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
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.

Nit: the artifact name field uses ${{ matrix.features && '-' }}${{ matrix.features }} (pre-existing pattern), while the new path fields use ${{ matrix.features && format('-{0}', matrix.features) || '' }}. These are functionally equivalent but maintaining two idioms for the same suffix is a readability/maintenance hazard. Consider unifying the name fields to also use format() for consistency.

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.

Nit (carried forward): The name fields still use the ${{ matrix.features && '-' }}${{ matrix.features }} idiom while path / env fields use ${{ matrix.features && format('-{0}', matrix.features) || '' }}. These are functionally equivalent but maintaining two patterns is a readability hazard. Consider unifying the name fields to also use format():

Suggested change
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
name: rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

path: target/${{ matrix.profile }}/rbuilder
path: target/${{ matrix.profile }}/rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

- name: Upload rbuilder-operator artifact
if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: rbuilder-operator-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
path: target/${{ matrix.profile }}/rbuilder-operator
path: target/${{ matrix.profile }}/rbuilder-operator-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

- name: Upload tbv-bidding-service artifact
if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: tbv-bidding-service-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
path: target/${{ matrix.profile }}/tbv-bidding-service
path: target/${{ matrix.profile }}/tbv-bidding-service-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

- name: Upload reth-rbuilder artifact
if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: reth-rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
path: target/${{ matrix.profile }}/reth-rbuilder
path: target/${{ matrix.profile }}/reth-rbuilder-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

- name: Upload bid-scraper artifact
if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: bid-scraper-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
path: target/${{ matrix.profile }}/bid-scraper
path: target/${{ matrix.profile }}/bid-scraper-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

- name: Upload rbuilder-rebalancer artifact
if: steps.platform-check.outputs.skip != 'true'
uses: actions/upload-artifact@v4
with:
name: rbuilder-rebalancer-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && '-' }}${{ matrix.features }}
path: target/${{ matrix.profile }}/rbuilder-rebalancer
path: target/${{ matrix.profile }}/rbuilder-rebalancer-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}${{ matrix.features && format('-{0}', matrix.features) || '' }}

- name: Upload *.deb packages
if: steps.platform-check.outputs.skip != 'true' && matrix.platform == 'linux'
Expand Down Expand Up @@ -290,12 +302,14 @@ jobs:
- name: Verify binary exists
if: steps.download-binary.outcome == 'success'
run: |
if [ -f "./rbuilder" ]; then
BIN="rbuilder-${{ env.VERSION }}-x86_64-unknown-linux-gnu${{ github.event.inputs.features && format('-{0}', github.event.inputs.features) || '' }}"
if [ -f "./${BIN}" ]; then
mv "./${BIN}" ./rbuilder
echo "✅ Binary downloaded successfully"
ls -lh ./rbuilder
else
echo "❌ Binary file not found after download"
find . -name "rbuilder" -type f || echo "No rbuilder file found"
ls -la
exit 1
fi

Expand Down
Loading