From 6926a652c0b92c99f8d513f7344b6ec3d33d5eb1 Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Wed, 29 Jan 2025 12:08:14 +0000 Subject: [PATCH] fix: crates.io publishing for zksync-era --- .github/actions/publish-crates/action.yaml | 15 +++++++++++++-- .github/workflows/release-please.yaml | 8 +++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/actions/publish-crates/action.yaml b/.github/actions/publish-crates/action.yaml index 00597c4..66d1004 100644 --- a/.github/actions/publish-crates/action.yaml +++ b/.github/actions/publish-crates/action.yaml @@ -35,6 +35,11 @@ inputs: type: string description: 'Slack webhook to use for notifications.' required: true + dependencies: + type: string + description: 'List of apt dependencies to install.' + required: false + default: '' runs: @@ -52,17 +57,23 @@ runs: with: bins: 'cargo-workspaces' + - name: Install dependencies + if: ${{ inputs.dependencies != '' }} + shell: 'bash -ex {0}' + working-directory: ${{ inputs.workspace_path }} + run: sudo apt update && sudo apt install --yes ${{ inputs.dependencies }} + - name: Build the workspace before release shell: 'bash -ex {0}' if: ${{ inputs.run_build == true || inputs.run_build == 'true' }} working-directory: ${{ inputs.workspace_path }} - run: cargo build + run: cargo build && cargo clean - name: Run tests before release shell: 'bash -ex {0}' if: ${{ inputs.run_tests == true || inputs.run_tests == 'true' }} working-directory: ${{ inputs.workspace_path }} - run: cargo test + run: cargo test && cargo clean - name: Login to registry shell: 'bash -ex {0}' diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index af7af01..3f73f8e 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -84,6 +84,11 @@ on: description: 'Suffix to add to the version of the crates.' required: false default: '' + dependencies: + type: string + description: 'List of apt dependencies to install' + required: false + default: '' outputs: releases_created: description: "Whether release-please created a new GitHub releases." @@ -222,7 +227,7 @@ jobs: publish-crates: needs: release-please name: Publish to crates.io - runs-on: matterlabs-ci-runner-high-performance + runs-on: matterlabs-ci-runner-highdisk if: ${{ needs.release-please.outputs.releases_created == 'true' && inputs.publish-to-crates-io == 'true' }} strategy: matrix: @@ -240,6 +245,7 @@ jobs: slack_webhook: ${{ secrets.slack_webhook }} run_build: ${{ inputs.run_build }} run_tests: ${{ inputs.run_tests }} + dependencies: ${{ inputs.dependencies }} # This job upgrades the workspace dependencies across different workspaces of one repository.