uncomment autopublishing

This commit is contained in:
vms 2021-04-28 16:27:09 +03:00
parent fd1bd13ee6
commit 4ec204ce81
6 changed files with 105 additions and 107 deletions

View File

@ -1,98 +1,98 @@
#name: "publish-release" name: "publish-release"
#
#on: on:
# push: push:
# branches: branches:
# - "master" - "master"
#
#jobs: jobs:
# npm-publish: npm-publish:
# name: "Publish release" name: "Publish release"
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# defaults: defaults:
# run: run:
# shell: bash shell: bash
#
# steps: steps:
# - name: Checkout repository - name: Checkout repository
# uses: actions/checkout@v2 uses: actions/checkout@v2
#
# ### Prepare cargo & toolchains ### Prepare cargo & toolchains
# - uses: actions/cache@v2 - uses: actions/cache@v2
# with: with:
# path: | path: |
# ~/.cargo/registry ~/.cargo/registry
# ~/.cargo/git ~/.cargo/git
# ~/.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 with wasm32-unknown-unknown
# uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
# with: with:
# toolchain: nightly toolchain: nightly
# profile: minimal profile: minimal
# override: true override: true
# - uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
# with: with:
# toolchain: nightly toolchain: nightly
# command: update command: update
# args: --aggressive args: --aggressive
#
# ### Calculate FINAL_VERSION ### Calculate FINAL_VERSION
# - name: Install jq & sponge - name: Install jq & sponge
# run: sudo apt-get update && sudo apt-get --yes --force-yes install jq moreutils 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-show cargo-workspaces toml-cli
# run: cargo install cargo-show cargo-workspaces toml-cli || true run: cargo install cargo-show cargo-workspaces toml-cli || true
#
# - name: Calculate the version - name: Calculate the version
# run: | run: |
# # install semver and add it to PATH # install semver and add it to PATH
# yarn global add semver yarn global add semver
# PATH="$(yarn global bin):$PATH" PATH="$(yarn global bin):$PATH"
#
# CARGO_TOML="Cargo.toml" CARGO_TOML="Cargo.toml"
# # get package name from Cargo.toml # get package name from Cargo.toml
# PKG_NAME="$(toml get "$CARGO_TOML" package.name | tr -d \")" PKG_NAME="$(toml get "$CARGO_TOML" package.name | tr -d \")"
# # get version from Cargo.toml # get version from Cargo.toml
# LOCAL_VERSION="$(toml get "$CARGO_TOML" package.version | tr -d \")" LOCAL_VERSION="$(toml get "$CARGO_TOML" package.version | tr -d \")"
#
# # Define accumulator array variable # Define accumulator array variable
# ALL_CRATES_VERSIONS=() ALL_CRATES_VERSIONS=()
#
# # For all crates in the workspace accumulate its max_version # For all crates in the workspace accumulate its max_version
# for CRATE_NAME in $(cargo ws list) for CRATE_NAME in $(cargo ws list)
# do do
# CRATE_VERSION="$((cargo show --json "$CRATE_NAME" | jq -r .crate.max_version) 2>/dev/null || true)" CRATE_VERSION="$((cargo show --json "$CRATE_NAME" | jq -r .crate.max_version) 2>/dev/null || true)"
# ALL_CRATES_VERSIONS+=($CRATE_VERSION) ALL_CRATES_VERSIONS+=($CRATE_VERSION)
# done done
# # Take the highest version of all # Take the highest version of all
# MAX_CRATES_VERSION="$(semver -p ${ALL_CRATES_VERSIONS[@]} | tail -n1 || true)" MAX_CRATES_VERSION="$(semver -p ${ALL_CRATES_VERSIONS[@]} | tail -n1 || true)"
# # Increment patch octet of the highest version # Increment patch octet of the highest version
# NEXT_CRATE_VERSION="$(semver --increment patch "${MAX_CRATES_VERSION}" || true)" NEXT_CRATE_VERSION="$(semver --increment patch "${MAX_CRATES_VERSION}" || true)"
#
# # take the highest version # take the highest version
# MAX_VERSION="$(semver "$NEXT_CRATE_VERSION" "$LOCAL_VERSION" | tail -n1)" MAX_VERSION="$(semver "$NEXT_CRATE_VERSION" "$LOCAL_VERSION" | tail -n1)"
# echo "FINAL_VERSION=$MAX_VERSION" | tee -a $GITHUB_ENV echo "FINAL_VERSION=$MAX_VERSION" | tee -a $GITHUB_ENV
# echo "PKG_NAME=$PKG_NAME" | 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: 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 --allow-dirty --yes custom "${{ env.FINAL_VERSION }}"
#
# ### Create a pre-release ### Create a pre-release
# - name: Create Release - name: Create Release
# id: create_release id: create_release
# uses: actions/create-release@v1 uses: actions/create-release@v1
# env: env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with: with:
# tag_name: ${{ env.FINAL_VERSION }} tag_name: ${{ env.FINAL_VERSION }}
# release_name: Fluence Rust SDK ${{ env.FINAL_VERSION }} release_name: Fluence Rust SDK ${{ env.FINAL_VERSION }}
# body: | body: |
# - [${{ env.FINAL_VERSION }} @ crates.io](https://crates.io/crates/${{ env.PKG_NAME }}/${{ env.FINAL_VERSION }}) - [${{ env.FINAL_VERSION }} @ crates.io](https://crates.io/crates/${{ env.PKG_NAME }}/${{ env.FINAL_VERSION }})
# draft: false draft: false
# prerelease: true prerelease: true

View File

@ -1,6 +1,6 @@
[package] [package]
name = "fluence-sdk-test-macro-impl" name = "fluence-sdk-test-macro-impl"
version = "0.1.2" # remember to update html_root_url version = "0.1.3" # remember to update html_root_url
edition = "2018" edition = "2018"
description = "Implementation of the `#[fce_test]` macro" description = "Implementation of the `#[fce_test]` macro"
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test" repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "fluence-sdk-test-macro" name = "fluence-sdk-test-macro"
version = "0.1.2" # remember to update html_root_url version = "0.1.3" # remember to update html_root_url
edition = "2018" edition = "2018"
description = "Definition of the `#[fce_test]` macro" description = "Definition of the `#[fce_test]` macro"
repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test" repository = "https://github.com/fluencelabs/rust-sdk/crates/macro-test"
@ -17,7 +17,7 @@ proc-macro = true
doctest = false doctest = false
[dependencies] [dependencies]
fluence-sdk-test-macro-impl = { path = "../fce-test-macro-impl", version = "0.1.2" } fluence-sdk-test-macro-impl = { path = "../fce-test-macro-impl", version = "0.1.3" }
quote = "1.0.9" quote = "1.0.9"
proc-macro2 = "1.0.24" proc-macro2 = "1.0.24"

View File

@ -1,6 +1,6 @@
[package] [package]
name = "fluence-test" name = "fluence-test"
version = "0.1.2" # remember to update html_root_url version = "0.1.3" # 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/"
repository = "https://github.com/fluencelabs/rust-sdk" repository = "https://github.com/fluencelabs/rust-sdk"
@ -19,7 +19,7 @@ path = "src/lib.rs"
doctest = false doctest = false
[dependencies] [dependencies]
fluence-sdk-test-macro = { path = "../crates/fce-test-macro", version = "0.1.2" } fluence-sdk-test-macro = { path = "../crates/fce-test-macro", version = "0.1.3" }
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"] }

View File

@ -1,6 +1,6 @@
[package] [package]
name = "fluence" name = "fluence"
version = "0.6.1" # remember to update html_root_url version = "0.6.2" # 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"

View File

@ -66,9 +66,7 @@ pub fn get_call_parameters() -> CallParameters {
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
pub fn get_call_parameters() -> CallParameters { pub fn get_call_parameters() -> CallParameters {
// return the default call parameters to allow compilation to native unimplemented!()
// that needed for cargo test
<_>::default()
} }
#[cfg(target_arch = "wasm32")] #[cfg(target_arch = "wasm32")]