Skip to content

ci: fix artifact download issue #7

ci: fix artifact download issue

ci: fix artifact download issue #7

name: SUI Move Build and Test
on:
pull_request:
branches:
- "main"
push:
branches:
- "**"
jobs:
build:
name: sui move build and test
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
REPO_OWNER: MystenLabs
REPO_NAME: sui
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install sui
run: |
latest_tag=$(curl -sSL "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest" | jq -r '.tag_name')
ubuntu_artifact="sui-mainnet-${latest_tag#mainnet-}-ubuntu-x86_64.tgz"
browser_download_url=$(curl -sSL "https://api.github.com/repos/$REPO_OWNER/$REPO_NAME/releases/latest" | jq -r '.assets[] | select(.name == "${ubuntu_artifact}") | .browser_download_url')
curl -LO $browser_download_url
sudo tar -xzvf ${ubuntu_artifact} sui -C /usr/local/bin
- name: build and test
run: bash ./scripts/optimize-move.sh