From 16937a2ea5b8290eb25f0ce708260c2e15c2e0cf Mon Sep 17 00:00:00 2001 From: Daniel Bigos Date: Mon, 16 Sep 2024 17:23:20 +0200 Subject: [PATCH] feat(ci): run CI workflow to check libraries before publishing to crates.io --- .github/workflows/check-publish.yml | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/check-publish.yml diff --git a/.github/workflows/check-publish.yml b/.github/workflows/check-publish.yml new file mode 100644 index 00000000..12185843 --- /dev/null +++ b/.github/workflows/check-publish.yml @@ -0,0 +1,41 @@ +name: check-publish +# This workflow checks that the libraries can be published on crates.io. +permissions: + contents: read +on: + push: + branches: [ main ] + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +env: + CARGO_TERM_COLOR: always +jobs: + check-publish: + name: Check publish on crates.io + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: set up rust + uses: dtolnay/rust-toolchain@master + id: toolchain + with: + target: wasm32-unknown-unknown + components: rust-src + toolchain: nightly-2024-01-01 + + - uses: Swatinem/rust-cache@v2 + + - name: check motsu-proc + run: cargo publish -p motsu-proc --target wasm32-unknown-unknown --dry-run + + - name: check motsu + run: cargo publish -p motsu --target wasm32-unknown-unknown --dry-run + + - name: check openzeppelin-crypto + run: cargo publish -p openzeppelin-crypto --target wasm32-unknown-unknown --dry-run + + - name: check openzeppelin-stylus + run: cargo publish -p openzeppelin-stylus --target wasm32-unknown-unknown --dry-run