From ffcf7e65983df3cb53d7a228849a073034cba161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kami=C5=84ski=20=40=20StarkWare?= Date: Thu, 1 Aug 2024 13:23:33 +0200 Subject: [PATCH] Publish to creates.io workflow (#86) Co-authored-by: 0xLucqs <70894690+0xLucqs@users.noreply.github.com> --- .github/workflows/build.yml | 9 +++------ .github/workflows/publish.yml | 23 +++++++++++++++++++++++ Cargo.toml | 1 + 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a03c5af7..9ad7043a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,12 +21,9 @@ jobs: - name: "Checkout source code" uses: "actions/checkout@v3" - - name: "Setup stable toolchain" - uses: "actions-rs/toolchain@v1" - with: - toolchain: "stable" - profile: "minimal" - override: true + - uses: actions/checkout@v3 + - name: Install toolchain + run: rustup show - name: "Install cargo-hack" run: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..4274058b --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +on: + push: + branches: + - main + tags: + - '*' + # just for manual testing + workflow_dispatch: + +name: Publish + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install toolchain + run: rustup show + + - run: cargo publish --dry-run --token ${CARGO_REGISTRY_TOKEN} + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 9b03b5fc..6277ccbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ authors = [ "Dan Brownstein <@dan-starkware>", "Federico Carrone <@unbalancedparentheses>", "Jonathan Lei <@xJonathanLEI>", + "Maciej KamiƄski <@maciejka>", ] edition = "2021" repository = "https://github.com/starknet-io/types-rs"