Skip to content
Open
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
shell: bash
run: |
mkdir -p ${{ env.TMP_BUILD_DIR }}
mkdir -p ${{ env.TMP_BUILD_DIR }}-light
aws s3 cp s3://sui-releases/${{ env.s3_existing_archive }} ./tmp/sui-${{ env.sui_tag }}-${os_type}.tgz
tar -xf ./tmp/sui-${{ env.sui_tag }}-${os_type}.tgz -C ${{ env.TMP_BUILD_DIR }}

Expand Down Expand Up @@ -203,6 +204,19 @@ jobs:
choco apikey --api-key ${{ secrets.CHOCO_API_KEY }} --source https://push.chocolatey.org/
choco push sui.${{ env.sui_version }}.nupkg --source https://push.chocolatey.org/

- name: Prepare light binaries for ${{ matrix.os }}
if: ${{ matrix.os == 'ubuntu-ghcloud' || matrix.os == 'ubuntu-arm64' }}
shell: bash
run: |
mkdir -p ${{ env.TMP_BUILD_DIR }}-light
for binary in $(cat ${{ env.BINARY_LIST_FILE }} | jq -r '.light_binaries[]'); do
export binary=$(echo ${binary} | tr -d $'\r')
Comment on lines +212 to +213
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

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

Because the repo is checked out at the target tag (ref: ${{ env.sui_tag }}), older tags won’t contain the new light_binaries key in binary-build-list.json. In that case jq -r '.light_binaries[]' will error and fail the job, which conflicts with the stated goal of generating light archives for already-existing releases. Consider making the jq query tolerant (e.g., defaulting to a minimal list) or sourcing the build list from the workflow revision instead of the tag checkout.

Suggested change
for binary in $(cat ${{ env.BINARY_LIST_FILE }} | jq -r '.light_binaries[]'); do
export binary=$(echo ${binary} | tr -d $'\r')
LIGHT_BINARIES=$(jq -r 'if has("light_binaries") then .light_binaries[] else "sui" end' "${{ env.BINARY_LIST_FILE }}")
for binary in ${LIGHT_BINARIES}; do
export binary=$(echo "${binary}" | tr -d $'\r')

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

it's ok, we don't re-release older releases.

cp ${{ env.TMP_BUILD_DIR }}/${binary}${{ env.extention }} ${{ env.TMP_BUILD_DIR }}-light/${binary}${{ env.extention }}
done

tar -cvzf ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}-light.tgz -C ${{ env.TMP_BUILD_DIR }}-light .


- name: Upload release artifacts for ${{ matrix.os }} platform
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # [email protected]
with:
Expand All @@ -211,13 +225,30 @@ jobs:
path: |
./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz

- name: Upload light release artifacts for ${{ matrix.os }} platform
if: ${{ matrix.os == 'ubuntu-ghcloud' || matrix.os == 'ubuntu-arm64' }}
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # [email protected]
with:
name: sui-binaries-${{ matrix.os }}-light
if-no-files-found: error
path: |
./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}-light.tgz

- name: Attach artifacts to ${{ env.sui_tag }} release in GH
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # pin@v1
with:
tag_name: ${{ env.sui_tag }}
files: |
./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz

- name: Attach light artifacts to ${{ env.sui_tag }} release in GH
if: ${{ matrix.os == 'ubuntu-ghcloud' || matrix.os == 'ubuntu-arm64' }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # pin@v1
with:
tag_name: ${{ env.sui_tag }}
files: |
./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}-light.tgz

trigger-walrus-testnet-tag-update:
name: Trigger Walrus Testnet Tag Update
needs: release-build
Expand Down
4 changes: 4 additions & 0 deletions binary-build-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"sui-test-validator",
"move-analyzer"
],
"light_binaries": [
"sui",
"move-analyzer"
],
"internal_binaries": [
"stress",
"sui-proxy",
Expand Down