Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: crates.io publishing for zksync-era #20

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/actions/publish-crates/action.yaml
Original file line number Diff line number Diff line change
@@ -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}'
8 changes: 7 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -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.