Skip to content
Open
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
23 changes: 21 additions & 2 deletions .github/workflows/release-80_publish-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ on:
required: false
type: string
default: prdoc
publish_jobs:
description: 'Number of parallel publish jobs (0 = sequential publishing, >0 = parallel with N jobs).'
required: false
type: string
default: '0'

permissions:
contents: write
Expand Down Expand Up @@ -251,6 +256,13 @@ jobs:
cargo update --workspace --offline || cargo update --workspace
echo "Cargo.lock updated"

- name: Verify workspace compiles
if: inputs.resume_from == 'full' || inputs.resume_from == 'apply'
run: |
echo "Checking that rewritten manifests compile..."
cargo check --workspace --all-targets 2>&1
echo "Workspace compiles successfully"

- name: Commit version bumps
if: inputs.resume_from == 'full' || inputs.resume_from == 'apply'
shell: bash
Expand Down Expand Up @@ -296,15 +308,21 @@ jobs:
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ inputs.registry == 'staging.crates.io' && secrets.STAGING_CRATES_IO_API_TOKEN || secrets.CRATES_IO_API_TOKEN }}
DRY_RUN: ${{ inputs.dry_run }}
REGISTRY: ${{ inputs.registry }}
PUBLISH_JOBS: ${{ inputs.publish_jobs }}
run: |
PARALLEL_ARGS=""
if [ "$PUBLISH_JOBS" -gt 0 ] 2>/dev/null; then
echo "Parallel publishing enabled with $PUBLISH_JOBS jobs"
PARALLEL_ARGS="-j $PUBLISH_JOBS --no-verify"
fi

if [ "$DRY_RUN" = true ]; then
echo "DRY RUN - Not actually publishing crates"
echo "Target registry: $REGISTRY"
parity-publish apply -p -d
parity-publish apply -p -d $PARALLEL_ARGS
else
echo "Publishing crates to $REGISTRY..."
parity-publish apply -p
parity-publish apply -p $PARALLEL_ARGS
echo "Crates published successfully to $REGISTRY!"
fi

Expand All @@ -331,6 +349,7 @@ jobs:
if: failure()
env:
CRATES_RELEASE_BRANCH: ${{ steps.derive_branch.outputs.CRATES_RELEASE_BRANCH }}
GITHUB_TOKEN: ${{ github.token }}
run: |
echo "Job failed. Pushing branch '$CRATES_RELEASE_BRANCH' to origin (paritytech-release) to preserve state for resume..."
# Restore origin to the fork repo in case it was changed by the upstream push step
Expand Down
Loading