forked from axelarnetwork/axelar-amplifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into solana-sync-1904
- Loading branch information
Showing
102 changed files
with
5,172 additions
and
8,433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Upload ampd contracts to Cloudflare R2 bucket | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: Github branch to checkout for compilation | ||
required: true | ||
default: main | ||
type: string | ||
|
||
|
||
jobs: | ||
compile-and-upload: | ||
name: Compile contracts and push to R2 | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
packages: write | ||
id-token: write | ||
steps: | ||
- name: Determine branch | ||
id: get-branch-name | ||
run: | | ||
if [ "${{ github.event_name }}" == "push" ]; then | ||
branch="main" | ||
else | ||
branch="${{ inputs.branch }}" | ||
fi | ||
echo "branch=$branch" >> $GITHUB_OUTPUT | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
path: axelar-amplifier | ||
submodules: recursive | ||
ref: ${{ steps.get-branch-name.outputs.branch }} | ||
|
||
- name: Compile amplifier contracts | ||
id: compile-contracts | ||
run: | | ||
cd axelar-amplifier | ||
docker run --rm -v "$(pwd)":/code --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry cosmwasm/rust-optimizer:0.15.1 | ||
commit_hash=$(git rev-parse --short HEAD) | ||
cd .. | ||
mkdir -p ./artifacts/$commit_hash/ | ||
sudo mv axelar-amplifier/artifacts/*.wasm ./artifacts/$commit_hash/ | ||
echo "wasm-directory=./artifacts" >> $GITHUB_OUTPUT | ||
- uses: ryand56/r2-upload-action@latest | ||
with: | ||
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | ||
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CF }} | ||
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CF }} | ||
r2-bucket: ${{ secrets.R2_BUCKET }} | ||
source-dir: ${{ steps.compile-contracts.outputs.wasm-directory }} | ||
destination-dir: ./pre-releases/ampd/contracts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.