mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2024-12-04 07:10:19 +00:00
Publish crates from repo as is (without version increment) (#35)
This commit is contained in:
parent
f89113f3e3
commit
3de1d949e4
60
.github/workflows/publish_release.yml
vendored
60
.github/workflows/publish_release.yml
vendored
@ -26,7 +26,7 @@ jobs:
|
|||||||
~/.cargo/bin
|
~/.cargo/bin
|
||||||
target
|
target
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
- name: Install Rust toolchain with wasm32-unknown-unknown
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
@ -38,50 +38,26 @@ jobs:
|
|||||||
command: update
|
command: update
|
||||||
args: --aggressive
|
args: --aggressive
|
||||||
|
|
||||||
### Calculate FINAL_VERSION
|
- name: Install jq
|
||||||
- name: Install jq & sponge
|
run: sudo apt-get update && sudo apt-get --yes --force-yes install jq
|
||||||
run: sudo apt-get update && sudo apt-get --yes --force-yes install jq moreutils
|
|
||||||
|
|
||||||
- name: Install cargo-show cargo-workspaces toml-cli
|
- name: Install cargo-workspaces
|
||||||
run: cargo install cargo-show cargo-workspaces toml-cli || true
|
run: cargo install cargo-workspaces || true
|
||||||
|
|
||||||
- name: Calculate the version
|
|
||||||
run: |
|
|
||||||
# install semver and add it to PATH
|
|
||||||
yarn global add semver
|
|
||||||
PATH="$(yarn global bin):$PATH"
|
|
||||||
|
|
||||||
CARGO_TOML="Cargo.toml"
|
|
||||||
# get package name from Cargo.toml
|
|
||||||
PKG_NAME="$(toml get "$CARGO_TOML" package.name | tr -d \")"
|
|
||||||
# get version from Cargo.toml
|
|
||||||
LOCAL_VERSION="$(toml get "$CARGO_TOML" package.version | tr -d \")"
|
|
||||||
|
|
||||||
# Define accumulator array variable
|
|
||||||
ALL_CRATES_VERSIONS=()
|
|
||||||
|
|
||||||
# For all crates in the workspace accumulate its max_version
|
|
||||||
for CRATE_NAME in $(cargo ws list)
|
|
||||||
do
|
|
||||||
CRATE_VERSION="$((cargo show --json "$CRATE_NAME" | jq -r .crate.max_version) 2>/dev/null || true)"
|
|
||||||
ALL_CRATES_VERSIONS+=($CRATE_VERSION)
|
|
||||||
done
|
|
||||||
# Take the highest version of all
|
|
||||||
MAX_CRATES_VERSION="$(semver -p ${ALL_CRATES_VERSIONS[@]} | tail -n1 || true)"
|
|
||||||
# Increment patch octet of the highest version
|
|
||||||
NEXT_CRATE_VERSION="$(semver --increment patch "${MAX_CRATES_VERSION}" || true)"
|
|
||||||
|
|
||||||
# take the highest version
|
|
||||||
MAX_VERSION="$(semver "$NEXT_CRATE_VERSION" "$LOCAL_VERSION" | tail -n1)"
|
|
||||||
echo "FINAL_VERSION=$MAX_VERSION" | tee -a $GITHUB_ENV
|
|
||||||
echo "PKG_NAME=$PKG_NAME" | tee -a $GITHUB_ENV
|
|
||||||
|
|
||||||
### === Rust package release ===
|
### === Rust package release ===
|
||||||
- name: Login to crates.io
|
- name: Login to crates.io
|
||||||
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
|
||||||
|
|
||||||
|
- name: Save fluence's crate version to env
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
PKG_NAME=fluence
|
||||||
|
VERSION=$(cargo ws list -l | grep "$PKG_NAME"$ | head -n1 | awk '{ print $2 }')
|
||||||
|
echo "VERSION=$VERSION" | tee -a $GITHUB_ENV
|
||||||
|
echo "PKG_NAME=$PKG_NAME" | tee -a $GITHUB_ENV
|
||||||
|
|
||||||
- name: Publish to crates.io
|
- name: Publish to crates.io
|
||||||
run: cargo ws publish --no-git-commit --allow-dirty --yes custom "${{ env.FINAL_VERSION }}"
|
run: cargo ws publish --no-git-commit --from-git --skip-published --yes
|
||||||
|
|
||||||
### Create a pre-release
|
### Create a pre-release
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
@ -90,9 +66,9 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.FINAL_VERSION }}
|
tag_name: ${{ env.VERSION }}
|
||||||
release_name: Fluence Rust SDK ${{ env.FINAL_VERSION }}
|
release_name: Fluence Rust SDK ${{ env.VERSION }}
|
||||||
body: |
|
body: |
|
||||||
- [${{ env.FINAL_VERSION }} @ crates.io](https://crates.io/crates/${{ env.PKG_NAME }}/${{ env.FINAL_VERSION }})
|
- [${{ env.VERSION }} @ crates.io](https://crates.io/crates/${{ env.PKG_NAME }}/${{ env.VERSION }})
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: true
|
prerelease: false
|
||||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,6 +1,11 @@
|
|||||||
|
# We keep Cargo.lock in the repo even though crates here are meant to be used as libraries. Reasons for that are:
|
||||||
|
# 1. It makes builds more stable
|
||||||
|
# 2. It doesn't affect users of the libraries in any way: Cargo.lock isn't included in the package distribution
|
||||||
|
# 3. If one of the dependencies breaks our build, we can always say when and why that happened
|
||||||
|
# 4. Since Cargo.lock isn't distributed (which is a good thing), we tend to specify inner dependencies with =x.x.x
|
||||||
|
|
||||||
# Rust artifacts
|
# Rust artifacts
|
||||||
target
|
target
|
||||||
Cargo.lock
|
|
||||||
|
|
||||||
# IDE metadate
|
# IDE metadate
|
||||||
.idea
|
.idea
|
||||||
|
1775
Cargo.lock
generated
Normal file
1775
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "fluence-sdk-main"
|
name = "fluence-sdk-main"
|
||||||
version = "0.6.4" # remember to update html_root_url
|
version = "0.6.8" # remember to update html_root_url
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Rust SDK for applications for the Fluence network"
|
description = "Rust SDK for applications for the Fluence network"
|
||||||
documentation = "https://docs.rs/fluence/marine-macro"
|
documentation = "https://docs.rs/fluence-sdk-main"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/main"
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/crates/main"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
keywords = ["fluence", "sdk", "webassembly"]
|
keywords = ["fluence", "sdk", "webassembly"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm"]
|
||||||
@ -19,7 +19,7 @@ crate-type = ["rlib"]
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
marine-macro = { path = "../marine-macro", version = "=0.6.4" }
|
marine-macro = { path = "../marine-macro", version = "=0.6.8" }
|
||||||
|
|
||||||
log = { version = "0.4.8", features = ["std"] }
|
log = { version = "0.4.8", features = ["std"] }
|
||||||
serde = "=1.0.118"
|
serde = "=1.0.118"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#![allow(clippy::missing_safety_doc)]
|
#![allow(clippy::missing_safety_doc)]
|
||||||
#![allow(clippy::needless_doctest_main)]
|
#![allow(clippy::needless_doctest_main)]
|
||||||
#![doc(html_root_url = "https://docs.rs/fluence-sdk-main/0.5.0")]
|
#![doc(html_root_url = "https://docs.rs/fluence-sdk-main/0.6.8")]
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
nonstandard_style,
|
nonstandard_style,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marine-macro-impl"
|
name = "marine-macro-impl"
|
||||||
version = "0.6.4" # remember to update html_root_url
|
version = "0.6.8" # remember to update html_root_url
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Implementation of the `#[marine]` macro"
|
description = "Implementation of the `#[marine]` macro"
|
||||||
documentation = "https://docs.rs/fluence/marine-macro"
|
documentation = "https://docs.rs/fluence/marine-macro-impl"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro"
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/crates/marine-macro-impl"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
keywords = ["fluence", "sdk", "webassembly", "it", "interface-types"]
|
keywords = ["fluence", "sdk", "webassembly", "it", "interface-types"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm"]
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![doc(html_root_url = "https://docs.rs/marine-macro-impl/0.6.2")]
|
#![doc(html_root_url = "https://docs.rs/marine-macro-impl/0.6.8")]
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
nonstandard_style,
|
nonstandard_style,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marine-macro"
|
name = "marine-macro"
|
||||||
version = "0.6.4" # remember to update html_root_url
|
version = "0.6.8" # remember to update html_root_url
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Definition of the `#[marine]` macro"
|
description = "Definition of the `#[marine]` macro"
|
||||||
documentation = "https://docs.rs/fluence/marine-macro"
|
documentation = "https://docs.rs/fluence/marine-macro"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro"
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/crates/marine-macro"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm"]
|
||||||
@ -18,4 +18,4 @@ proc-macro = true
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
marine-macro-impl = { path = "../marine-macro-impl", version = "=0.6.4" }
|
marine-macro-impl = { path = "../marine-macro-impl", version = "=0.6.8" }
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
#![doc(html_root_url = "https://docs.rs/marine-macro/0.5.0")]
|
#![doc(html_root_url = "https://docs.rs/marine-macro/0.6.8")]
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
nonstandard_style,
|
nonstandard_style,
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marine-test-macro-impl"
|
name = "marine-test-macro-impl"
|
||||||
version = "0.1.5" # remember to update html_root_url
|
version = "0.1.8" # remember to update html_root_url
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Implementation of the `#[marine_test]` macro"
|
description = "Implementation of the `#[marine_test]` macro"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test"
|
documentation = "https://docs.rs/fluence/marine-test-macro-impl"
|
||||||
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/crates/marine-test-macro-impl"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm", "development-tools::testing"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marine-test-macro"
|
name = "marine-test-macro"
|
||||||
version = "0.1.6" # remember to update html_root_url
|
version = "0.1.8" # remember to update html_root_url
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Definition of the `#[marine_test]` macro"
|
description = "Definition of the `#[marine_test]` macro"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test"
|
documentation = "https://docs.rs/fluence/marine-test-macro"
|
||||||
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/crates/marine-test-macro"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm", "development-tools::testing"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
@ -17,7 +18,7 @@ proc-macro = true
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "0.1.5" }
|
marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "0.1.8" }
|
||||||
|
|
||||||
quote = "1.0.9"
|
quote = "1.0.9"
|
||||||
proc-macro2 = "1.0.24"
|
proc-macro2 = "1.0.24"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![doc(html_root_url = "https://docs.rs/fluence-test-macro/0.1.4")]
|
#![doc(html_root_url = "https://docs.rs/fluence-test-macro/0.1.8")]
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
nonstandard_style,
|
nonstandard_style,
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "marine-timestamp-macro"
|
name = "marine-timestamp-macro"
|
||||||
version = "0.6.2" # remember to update html_root_url
|
version = "0.6.8" # remember to update html_root_url
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
description = "Definition of the `#[build_timestamp]` macro"
|
description = "Definition of the `#[build_timestamp]` macro"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk/crates/timestamp-macro"
|
documentation = "https://docs.rs/fluence/marine-timestamp-macro"
|
||||||
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/crates/marine-timestamp-macro"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
keywords = ["fluence", "sdk", "webassembly", "procedural_macros"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm"]
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "fluence-test"
|
name = "fluence-test"
|
||||||
version = "0.1.7" # remember to update html_root_url
|
version = "0.1.8" # remember to update html_root_url
|
||||||
description = "Fluence backend SDK for testing"
|
description = "Fluence backend SDK for testing"
|
||||||
documentation = "https://docs.rs/fluence/"
|
documentation = "https://docs.rs/fluence-test"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk"
|
repository = "https://github.com/fluencelabs/rust-sdk/tree/master/fluence-test"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
#readme = "README.md"
|
keywords = ["fluence", "sdk", "webassembly", "test"]
|
||||||
keywords = ["fluence", "sdk", "webassembly"]
|
categories = ["api-bindings", "wasm", "development-tools::testing"]
|
||||||
categories = ["api-bindings", "wasm"]
|
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ path = "src/lib.rs"
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
marine-test-macro = { path = "../crates/marine-test-macro", version = "0.1.6" }
|
marine-test-macro = { path = "../crates/marine-test-macro", version = "0.1.8" }
|
||||||
fluence-app-service = { version = "0.7.0", features = ["raw-module-api"] }
|
fluence-app-service = { version = "0.7.0", features = ["raw-module-api"] }
|
||||||
|
|
||||||
serde = { version = "1.0.118", features = ["derive"] }
|
serde = { version = "1.0.118", features = ["derive"] }
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![doc(html_root_url = "https://docs.rs/fluence-test/0.1.5")]
|
#![doc(html_root_url = "https://docs.rs/fluence-test/0.1.8")]
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
nonstandard_style,
|
nonstandard_style,
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "fluence"
|
name = "fluence"
|
||||||
version = "0.6.5" # remember to update html_root_url
|
version = "0.6.8" # remember to update html_root_url
|
||||||
description = "Fluence backend SDK for developing backend applications for the Fluence network"
|
description = "Fluence backend SDK for developing backend applications for the Fluence network"
|
||||||
documentation = "https://docs.rs/fluence/"
|
documentation = "https://docs.rs/fluence"
|
||||||
repository = "https://github.com/fluencelabs/rust-sdk"
|
repository = "https://github.com/fluencelabs/rust-sdk"
|
||||||
authors = ["Fluence Labs"]
|
authors = ["Fluence Labs"]
|
||||||
#readme = "README.md"
|
|
||||||
keywords = ["fluence", "sdk", "webassembly"]
|
keywords = ["fluence", "sdk", "webassembly"]
|
||||||
categories = ["api-bindings", "wasm"]
|
categories = ["api-bindings", "wasm"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
@ -19,9 +18,9 @@ path = "src/lib.rs"
|
|||||||
doctest = false
|
doctest = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
marine-macro = { path = "../crates/marine-macro", version = "=0.6.4" }
|
marine-macro = { path = "../crates/marine-macro", version = "=0.6.8" }
|
||||||
fluence-sdk-main = { path = "../crates/main", version = "=0.6.4" }
|
fluence-sdk-main = { path = "../crates/main", version = "=0.6.8" }
|
||||||
marine-timestamp-macro = { path = "../crates/timestamp-macro", version = "=0.6.2" }
|
marine-timestamp-macro = { path = "../crates/timestamp-macro", version = "=0.6.8" }
|
||||||
|
|
||||||
serde = { version = "1.0.118", features = ["derive"]}
|
serde = { version = "1.0.118", features = ["derive"]}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
//! pub fn curl_get(url: String) -> String;
|
//! pub fn curl_get(url: String) -> String;
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
#![doc(html_root_url = "https://docs.rs/fluence/0.5.0")]
|
#![doc(html_root_url = "https://docs.rs/fluence/0.6.8")]
|
||||||
#![deny(
|
#![deny(
|
||||||
dead_code,
|
dead_code,
|
||||||
nonstandard_style,
|
nonstandard_style,
|
||||||
|
Loading…
Reference in New Issue
Block a user