Skip to content

Commit

Permalink
Install older version of aws to fix release workflow (#6660)
Browse files Browse the repository at this point in the history
## Motivation

Version 2.23.x of `aws` has a known issue where uploads to cloudflare fail because of checksum errors. Version 2.22.x seems to not be affected by this issue. This PR updates the release and api swagger workflows to install version 2.22.33 before upload to avoid checksum errors.
  • Loading branch information
fasmat committed Jan 23, 2025
1 parent d85f02a commit 5591ac8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/api-swagger-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
fetch-depth: 0
ref: 'refs/tags/${{ needs.check-version.outputs.go-sm-api-version }}'

- name: Install aws-cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
- name: upload to testnet
run: >
aws s3 sync api/release/openapi/swagger/src
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,26 @@ jobs:
run: |
mkdir build-zip
cp ${{ env.OUTNAME }}.zip build-zip
- name: Install aws-cli on linux
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
- name: Install aws-cli on linux-arm
if: ${{ matrix.os == 'ubuntu-latest-arm-8-cores' }}
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64-2.2.35.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
- name: Install aws-cli on mac
if: ${{ matrix.os == 'macos-13' }}
run: |
curl "https://awscli.amazonaws.com/AWSCLIV2-2.22.35.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
- name: Install aws-cli on windows
if: ${{ matrix.os == 'windows-2022' }}
run: choco install awscli --version=2.22.35 --allow-downgrade
- name: Upload zip to R2
run: >
aws s3 sync build-zip
Expand All @@ -111,7 +131,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
- name: Install coreutils
if: ${{ matrix.os == 'macos-13' || matrix.os == '[self-hosted, macOS, ARM64, go-spacemesh]' }}
if: ${{ matrix.os == 'macos-13' }}
run: brew install coreutils
- name: Calculate the hashsum of the zip file
if: ${{ matrix.os != 'windows-2022' }}
Expand Down Expand Up @@ -180,6 +200,11 @@ jobs:
run: |
mkdir sha256sum
cp sha256sum.yaml sha256sum
- name: Install aws-cli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.22.35.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --update
- name: Upload sha256sums to R2
run: >
aws s3 sync sha256sum
Expand Down

0 comments on commit 5591ac8

Please sign in to comment.