diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c2b85cd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: Release + +on: + release: + types: [created] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + permissions: + id-token: write # Required for OIDC token exchange + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - uses: rust-lang/crates-io-auth-action@v1 + id: auth + - run: | + make publish-crate + env: + CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index a4c46cc..917382d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sparse-merkle-tree" -version = "0.6.1" +version = "0.6.2" authors = ["jjy "] edition = "2018" license = "MIT" diff --git a/Makefile b/Makefile index 278c4f7..12bfdd7 100644 --- a/Makefile +++ b/Makefile @@ -33,3 +33,6 @@ test-cxx-build: test-blake2b-ref: cargo test --no-default-features --features="std","with-blake2b-ref" + +publish-crate: + cargo publish \ No newline at end of file