Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test
Browse files Browse the repository at this point in the history
antonbaliasnikov committed Jan 21, 2025

Verified

This commit was signed with the committer’s verified signature.
antonbaliasnikov Anton Baliasnikov
1 parent 9234788 commit ab5ab45
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/actions/publish-crates/action.yaml
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ runs:
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
bins: 'cargo-workspaces,cargo-get'
bins: 'cargo-workspaces'

- name: Build the workspace before release
shell: 'bash -ex {0}'
24 changes: 8 additions & 16 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ jobs:
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
bins: 'cargo-workspaces,cargo-get'
bins: 'cargo-workspaces'

- name: Update Cargo.lock
shell: 'bash -ex {0}'
@@ -174,28 +174,21 @@ jobs:
if [[ ${BRANCH} == *components* ]]; then
COMPONENT="${BRANCH##*--}"
COMPONENT_PATH=$(jq -r --arg component ${COMPONENT} '.packages | to_entries[] | select(.value.component == $component) | .key' ${{ inputs.config }})
COMPONENT_VERSION=$(jq -r ".${COMPONENT_PATH}" ${{ inputs.manifest }})
(
cd "${COMPONENT_PATH}"
if [[ ${{ inputs.version-suffix }} != '' ]]; then
WORKSPACE_VERSION=$(cargo get workspace.package.version)
cargo workspaces version custom ${WORKSPACE_VERSION}-${{ inputs.version-suffix }} \
if [[ '${{ inputs.version-suffix }}' != '' ]]; then
cargo workspaces version custom ${COMPONENT_VERSION}-${{ inputs.version-suffix }} \
--all --no-git-commit --force "*" --yes
fi
cargo update --workspace
)
else if [[ '${{ inputs.workspace-dirs }}' != '' ]]; then
fi
if [[ '${{ inputs.workspace-dirs }}' != '' ]]; then
# In case of a one PR for multiple components
# update Cargo.lock for all components using the workspace-dirs input.
for WORKSPACE in ${{ inputs.workspace-dirs }} ; do
(
cd "${WORKSPACE}"
if [[ ${{ inputs.version-suffix }} != '' ]]; then
WORKSPACE_VERSION=$(cargo get workspace.package.version)
cargo workspaces version custom ${WORKSPACE_VERSION}-${{ inputs.version-suffix }} \
--all --no-git-commit --force "*" --yes
fi
cargo update --workspace
)
( cd "${WORKSPACE}" && cargo update --workspace )
done
fi
# Commit changes to Cargo.lock if any
@@ -231,7 +224,7 @@ jobs:
max-parallel: 1 # Publish workspaces one by one to prevent possible rate limiting issues
steps:
- name: Publish crates
uses: matter-labs/zksync-ci-common/.github/actions/publish-crates@aba-custom-crates-suffix
uses: matter-labs/zksync-ci-common/.github/actions/publish-crates@v1
with:
workspace_path: ${{ matrix.path }}
org_owner: ${{ inputs.org-owner }}
@@ -240,7 +233,6 @@ jobs:
slack_webhook: ${{ secrets.slack_webhook }}
run_build: ${{ inputs.run_build }}
run_tests: ${{ inputs.run_tests }}
version-suffix: ${{ inputs.version-suffix }}


# This job upgrades the workspace dependencies across different workspaces of one repository.

0 comments on commit ab5ab45

Please sign in to comment.