Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sui.exe path for chocolatey upload #18222

Merged
merged 14 commits into from
Jun 12, 2024
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ jobs:
export sui_version=$(echo ${sui_tag} | sed -e 's/mainnet-v//' -e 's/testnet-v//')
echo "sui_version=${sui_version}" >> $GITHUB_ENV

- name: Check out ${{ env.sui_tag }}
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
with:
ref: ${{ env.sui_tag }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # pin v4.0.2
with:
Expand Down Expand Up @@ -97,6 +102,7 @@ jobs:
run: |
mkdir -p ${{ env.TMP_BUILD_DIR }}
aws s3 cp s3://sui-releases/releases/sui-${{ env.sui_tag }}-${os_type}.tgz ./tmp/sui-${{ env.sui_tag }}-${os_type}.tgz
tar -xf ./tmp/sui-${{ env.sui_tag }}-${os_type}.tgz -C ${{ env.TMP_BUILD_DIR }}

- name: Setup caching
if: ${{ env.s3_archive_exist == '' }}
Expand Down Expand Up @@ -133,13 +139,7 @@ jobs:
PKG_CONFIG_PATH: "/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
PATH: "/opt/homebrew/bin:$PATH"
run: |
brew install postgresql

- name: Check out ${{ env.sui_tag }}
if: ${{ env.s3_archive_exist == '' }}
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
with:
ref: ${{ env.sui_tag }}
brew install postgresql

- name: Cargo build for ${{ matrix.os }} platform
if: ${{ env.s3_archive_exist == '' }}
Expand All @@ -163,14 +163,14 @@ jobs:
tar -cvzf ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz -C ${{ env.TMP_BUILD_DIR }} .
[[ ${{ env.sui_tag }} == *"testnet"* ]] && aws s3 cp ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz s3://sui-releases/releases/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz || true

- name: "Publish Windows sui binary to Chocolately"
- name: Publish Windows sui binary to Chocolatey
if: ${{ matrix.os == 'windows-ghcloud' && contains( env.sui_tag, 'testnet') }}
working-directory: chocolatey
continue-on-error: true
shell: bash
run: |
choco install checksum
export sui_sha=$(checksum -t sha256 ${{ env.TMP_BUILD_DIR }}/sui.exe)
cd chocolatey

cat <<EOF >>VERIFICATION.txt
Sui Binary verification steps
Expand Down
2 changes: 1 addition & 1 deletion chocolatey/sui.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ enclosed in quotation marks, you should use an editor that supports UTF-8, not t
<releaseNotes>https://github.com/MystenLabs/sui/releases/tag/mainnet-v$version$</releaseNotes>
</metadata>
<files>
<file src="../target/release/sui.exe" target="bin/sui.exe" />
<file src="./tmp/release/sui.exe" target="bin/sui.exe" />
<file src="../LICENSE" target="bin/LICENSE.txt" />
<file src="./VERIFICATION.txt" target="bin/VERIFICATION.txt" />
</files>
Expand Down
Loading