Skip to content

Commit

Permalink
ci: add stellar expert wasm release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed Apr 24, 2024
1 parent 6886e10 commit db27596
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 9 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Stellar Expert WASM Release
on:
push:
tags:
- 'v*' # triggered whenever a new tag (previxed with "v") is pushed to the repository
jobs:
release-contract-governor:
uses: stellar-expert/soroban-build-workflow/.github/workflows/release.yml@main
with:
release_name: ${{ github.ref_name }}
release_description: 'Soroban Governor Release'
relative_path: '["contracts/governor"]'
package: 'soroban-governor'
make_target: 'build'
secrets:
release_token: ${{ secrets.GITHUB_TOKEN }}

release-contract-votes:
uses: stellar-expert/soroban-build-workflow/.github/workflows/release.yml@main
with:
release_name: ${{ github.ref_name }}
release_description: 'Soroban Bonding Votes Release'
relative_path: '["contracts/votes"]'
package: 'soroban-votes'
secrets:
release_token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ test: build
build:
mkdir -p target/wasm32-unknown-unknown/optimized

cargo rustc --manifest-path=contracts/votes/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release --features soroban-votes/clawback
cargo rustc --manifest-path=contracts/votes/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release --no-default-features --features soroban-votes/clawback
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/soroban_votes.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/soroban_admin_votes.wasm


cargo rustc --manifest-path=contracts/votes/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release --features soroban-votes/sep-0041
cargo rustc --manifest-path=contracts/votes/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release --no-default-features --features soroban-votes/sep-0041
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/soroban_votes.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/soroban_votes.wasm

cargo rustc --manifest-path=contracts/votes/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release --features soroban-votes/bonding
cargo rustc --manifest-path=contracts/votes/Cargo.toml --crate-type=cdylib --target=wasm32-unknown-unknown --release
soroban contract optimize \
--wasm target/wasm32-unknown-unknown/release/soroban_votes.wasm \
--wasm-out target/wasm32-unknown-unknown/optimized/soroban_votes_bonding.wasm
Expand Down
4 changes: 2 additions & 2 deletions contracts/governor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "soroban-governor"
version = "0.0.0"
version = "1.0.0"
authors = ["Script3 Ltd. <[email protected]>"]
license = "AGPL-3.0"
license = "MIT"
edition = "2021"
publish = false

Expand Down
5 changes: 3 additions & 2 deletions contracts/votes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "soroban-votes"
version = "0.0.0"
version = "1.0.0"
authors = ["Script3 Ltd. <[email protected]>"]
license = "AGPL-3.0"
license = "MIT"
edition = "2021"
publish = false

Expand All @@ -11,6 +11,7 @@ crate-type = ["cdylib", "rlib"]
doctest = false

[features]
default = ["bonding"]
testutils = ["soroban-sdk/testutils"]
bonding = []
sep-0041 = []
Expand Down

0 comments on commit db27596

Please sign in to comment.