Skip to content

Attach Sui binaries to a release #306

Attach Sui binaries to a release

Attach Sui binaries to a release #306

Workflow file for this run

name: Attach Sui binaries to a release
on:
release:
types: [published]
workflow_dispatch:
inputs:
sui_tag:
description: 'Sui repo tag to build from'
type: string
required: true
env:
TAG_NAME: "${{ github.event.inputs.sui_tag || github.ref }}"
CARGO_TERM_COLOR: always
# Disable incremental compilation.
#
# Incremental compilation is useful as part of an edit-build-test-edit cycle,
# as it lets the compiler avoid recompiling code that hasn't changed. However,
# on CI, we're not making small edits; we're almost always building the entire
# project from scratch. Thus, incremental compilation on CI actually
# introduces *additional* overhead to support making future builds
# faster...but no future builds will ever occur in any given CI environment.
#
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
# for details.
CARGO_INCREMENTAL: 0
# Allow more retries for network requests in cargo (downloading crates) and
# rustup (installing toolchains). This should help to reduce flaky CI failures
# from transient network timeouts or other issues.
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short
jobs:
update-homebrew-formula:
name: run brew bump-formula-pr for sui on testnet releases
runs-on: ubuntu-latest
# releasing sui cli on testnet releases because it lags `main` less than mainnet, but is more likely to be stable than devnet
if: ${{ contains( inputs.sui_tag, 'testnet') || contains( github.ref, 'testnet') }}
steps:
- name: Clean up tag name ${{ env.TAG_NAME }}
shell: bash
run: |
echo "sui_tag=$(echo ${{ env.TAG_NAME }} | sed s/'refs\/tags\/'//)" >> $GITHUB_ENV
- uses: mislav/bump-homebrew-formula-action@v3
with:
formula-name: sui
create-pullrequest: true
tag-name: "${{ env.sui_tag }}"
env:
# https://github.com/settings/tokens/new?scopes=public_repo,workflow
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GH_FORMULA_BUMP }}