Skip to content

Commit 3a694d5

Browse files
paritytech-release-backport-bot[bot]BDevParityEgorPopelyaev
authored
[stable2506] Backport #11693 (#11696)
Backport #11693 into `stable2506` from BDevParity. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. <!-- # To be used by other automation, do not modify: original-pr-number: #${pull_number} --> Co-authored-by: BDevParity <bruno.devic@parity.io> Co-authored-by: Egor_P <egor@parity.io>
1 parent 102270e commit 3a694d5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/release-80_publish-crates.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ on:
4545
required: false
4646
type: string
4747
default: '0'
48+
clean_every:
49+
description: 'Run cargo clean after every N published crates to free disk space (0 = disabled). Recommend 50 for major releases with 100+ crates, otherwise the job may fail due to disk space.'
50+
required: false
51+
type: string
52+
default: '0'
4853

4954
permissions:
5055
contents: write
@@ -184,7 +189,7 @@ jobs:
184189
- name: Install parity-publish
185190
run: |
186191
sudo apt-get update && sudo apt-get install -y --no-install-recommends libcurl4-openssl-dev pkg-config
187-
cargo install parity-publish@0.10.14 --locked -q
192+
cargo install parity-publish@0.10.15 --locked -q
188193
189194
- name: Run parity-publish plan
190195
if: inputs.resume_from == 'full'
@@ -310,13 +315,20 @@ jobs:
310315
DRY_RUN: ${{ inputs.dry_run }}
311316
REGISTRY: ${{ inputs.registry }}
312317
PUBLISH_JOBS: ${{ inputs.publish_jobs }}
318+
CLEAN_EVERY: ${{ inputs.clean_every }}
313319
run: |
314320
PARALLEL_ARGS=""
315321
if [ "$PUBLISH_JOBS" -gt 0 ] 2>/dev/null; then
316322
echo "Parallel publishing enabled with $PUBLISH_JOBS jobs"
317323
PARALLEL_ARGS="-j $PUBLISH_JOBS --no-verify"
318324
fi
319325
326+
CLEAN_ARGS=""
327+
if [ "$CLEAN_EVERY" -gt 0 ] 2>/dev/null; then
328+
echo "Disk cleanup enabled: cargo clean every $CLEAN_EVERY crates"
329+
CLEAN_ARGS="--clean-every $CLEAN_EVERY"
330+
fi
331+
320332
STAGING_ARG=""
321333
if [ "$REGISTRY" = "staging.crates.io" ]; then
322334
STAGING_ARG="--staging"
@@ -325,10 +337,10 @@ jobs:
325337
if [ "$DRY_RUN" = true ]; then
326338
echo "DRY RUN - Not actually publishing crates"
327339
echo "Target registry: $REGISTRY"
328-
parity-publish apply -p -d $STAGING_ARG $PARALLEL_ARGS
340+
parity-publish apply -p -d $STAGING_ARG $PARALLEL_ARGS $CLEAN_ARGS
329341
else
330342
echo "Publishing crates to $REGISTRY..."
331-
parity-publish apply -p $STAGING_ARG $PARALLEL_ARGS
343+
parity-publish apply -p $STAGING_ARG $PARALLEL_ARGS $CLEAN_ARGS
332344
echo "Crates published successfully to $REGISTRY!"
333345
fi
334346

0 commit comments

Comments
 (0)