Skip to content

Commit 0603491

Browse files
dastanChristian Cuaresma
andauthored
Match node version with tag version (#270)
* Add tag version to crates * Unify other crate versions * Add version matching check * Revert other crates * Fetch depth * Another tag extraction * Move checks * check version only on release --------- Co-authored-by: Christian Cuaresma <[email protected]>
1 parent 15efe91 commit 0603491

9 files changed

Lines changed: 28 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ jobs:
7272
- name: Check clippy
7373
run: |
7474
cargo clippy --all-targets --workspace --features runtime-benchmarks --features try-runtime
75-
7675
test:
7776
runs-on:
7877
group: laos

.github/workflows/release.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,29 @@ name: Release
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v*.*.*'
77
workflow_dispatch:
88

99
jobs:
10+
check-version:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
proceed: ${{ steps.check_version.outputs.proceed }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
- id: check_version
17+
run: |
18+
VERSION=$(grep -m1 version Cargo.toml | sed -E 's/.*"(.*)".*/\1/')
19+
if [ "$VERSION" == "${{ github.ref_name }}" ]; then
20+
echo "::set-output name=proceed::true"
21+
else
22+
echo "Version in Cargo.toml ($VERSION) does not match current tag ${{ github.ref_name }}. Canceling release..."
23+
echo "::set-output name=proceed::false"
24+
fi
25+
1026
dockerize:
27+
needs: check-version
28+
if: needs.check-version.outputs.proceed == 'true'
1129
runs-on:
1230
group: laos
1331
labels: ubuntu-16-cores
@@ -20,25 +38,21 @@ jobs:
2038
- name: Build
2139
run: |
2240
cargo build --release
23-
2441
- name: Log in to Docker Hub
2542
uses: docker/[email protected]
2643
with:
2744
username: ${{ secrets.DOCKER_USERNAME }}
2845
password: ${{ secrets.DOCKER_TOKEN }}
29-
30-
- name: push image ownership node
46+
- name: Push image ownership node
3147
uses: docker/build-push-action@v4
3248
with:
3349
context: .
3450
push: true
3551
file: ./docker/ownership-node.local.Dockerfile
3652
tags: freeverseio/laos-ownership-node:${{ github.ref_name }}
37-
3853
- name: Upload Ownership Wasm Binaries
3954
run: |
4055
echo "Uploading ownership wasm binary for release ${{ github.ref_name }}"
4156
gh release upload ${{ github.ref_name }} ./target/release/wbuild/laos-ownership-runtime/laos_ownership_runtime.compact.compressed.wasm
4257
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description = "The LAOS parachain node."
33
repository = "https://github.com/freeverseio/laos.git"
44
homepage = "https://www.laosfoundation.io"
55
authors = ["Freeverse"]
6+
version = "0.9.0"
67

78
[workspace]
89
resolver = "2"

ownership-chain/node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "laos-ownership"
3-
version = "0.1.0"
43
edition = "2021"
54
authors = { workspace = true }
5+
version = { workspace = true }
66
build = "build.rs"
77

88
[dependencies]

ownership-chain/node/src/rpc/eth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use sp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi};
2121
use sp_core::H256;
2222
use sp_runtime::traits::Block as BlockT;
2323
// Frontier
24-
pub use fc_rpc::{EthBlockDataCacheTask, EthConfig, OverrideHandle, StorageOverride};
24+
pub use fc_rpc::{EthBlockDataCacheTask, EthConfig, OverrideHandle};
2525
#[cfg(feature = "txpool")]
2626
use fc_rpc::{TxPool, TxPoolApiServer};
2727
pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};

ownership-chain/precompile/utils/macro/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "laos-precompile-utils-macro"
33
authors = ["StakeTechnologies", "PureStake"]
4-
description = ""
4+
description = "Precompile macro utilities"
55
version = "0.1.0"
66
edition = "2021"
77

ownership-chain/runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "laos-ownership-runtime"
3-
version = "0.1.0"
43
edition = "2021"
4+
version = { workspace = true }
55

66
[package.metadata.docs.rs]
77
targets = ["x86_64-unknown-linux-gnu"]

ownership-chain/runtime/src/weights/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,5 @@ pub mod extrinsic_weights;
2222
pub mod paritydb_weights;
2323
pub mod rocksdb_weights;
2424

25-
pub use block_weights::constants::BlockExecutionWeight;
2625
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
27-
pub use paritydb_weights::constants::ParityDbWeight;
2826
pub use rocksdb_weights::constants::RocksDbWeight;

0 commit comments

Comments
 (0)