Skip to content

Commit

Permalink
added chain validation
Browse files Browse the repository at this point in the history
  • Loading branch information
gofmanaa committed Jul 19, 2024
1 parent d6d4263 commit f7f80f5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/release2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:
RUST_BACKTRACE: 1
CARGO_NET_GIT_FETCH_WITH_CLI: true

permissions:
contents: write

jobs:
build:
Expand Down Expand Up @@ -68,18 +70,18 @@ jobs:
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
command: "build"
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true

- name: Package release binaries
run: |
cd target/${{ matrix.platform.target }}/release
cd target/${{ matrix.platform.target }}/release/
if [[ "${{ matrix.platform.name }}" == *.zip ]]; then
zip ${{ matrix.platform.name }} ${{ matrix.platform.bin }}
zip ${{ matrix.platform.bin }}-${{ matrix.platform.name }} ${{ matrix.platform.bin }}
else
tar -czvf ${{ matrix.platform.name }} ${{ matrix.platform.bin }}
tar -czvf ${{ matrix.platform.bin }}-${{ matrix.platform.name }}.tar.gz ${{ matrix.platform.bin }}
fi
shell: bash

Expand All @@ -101,13 +103,28 @@ jobs:
with:
path: ./release-binaries

- name: Upload release binaries to GitHub Release
uses: ncipollo/release-action@v1
# - name: Upload release binaries to GitHub Release
# uses: ncipollo/release-action@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# tag: ${{ github.event.inputs.tag }}
# name: Release ${{ github.event.inputs.tag }}
# artifacts: "./release-binaries/mamorurs-cli-*"

- name: release
uses: softprops/action-gh-release@v2
with:
files: ./release-binaries/*
draft: false
prerelease: false
tag_name: ${{ github.event.inputs.tag }}
release_name: ${{ github.event.inputs.tag }}
body: "Release ${{ github.event.inputs.tag }}"
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
name: Release ${{ github.event.inputs.tag }}
artifacts: "./release-binaries/mamorurs-cli-*"
generate_release_notes: false




# - uses: AButler/[email protected]
# with:
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ tonic-build = "0.9"
[dev-dependencies]
mockito = "0.29.0"
sealed_test = "1.1.0"

[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"
5 changes: 4 additions & 1 deletion src/commands/agent/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ pub async fn publish_agent(
) -> Result<String, Box<dyn std::error::Error>> {
let manifest = read_manifest_file(dir_path).expect("Manifest file not found");

println!("Publishing agent to chain: {color_green}{}{color_reset}", chain_name);
println!(
"Publishing agent to chain: {color_green}{}{color_reset}",
chain_name
);

if !check_supported_chains(&manifest.supported_chains, &chain_name) {
eprintln!(
Expand Down

0 comments on commit f7f80f5

Please sign in to comment.