Skip to content

Commit ec9b6ac

Browse files
[stable2509] Backport #11461 (#11551)
Backport #11461 into `stable2509` 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>
1 parent 2ea6ccc commit ec9b6ac

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ jobs:
291291
292292
if [ "$REGISTRY" = "staging.crates.io" ]; then
293293
cat >> ~/.cargo/config.toml << 'EOF'
294-
[registries.crates-io]
294+
[registries.staging]
295295
index = "sparse+https://index.staging.crates.io/"
296296
EOF
297297
else
@@ -305,7 +305,8 @@ jobs:
305305
if: inputs.resume_from != 'push'
306306
shell: bash
307307
env:
308-
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ inputs.registry == 'staging.crates.io' && secrets.STAGING_CRATES_IO_API_TOKEN || secrets.CRATES_IO_API_TOKEN }}
308+
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ secrets.CRATES_IO_API_TOKEN }}
309+
PARITY_PUBLISH_STAGING_CRATESIO_TOKEN: ${{ secrets.STAGING_CRATES_IO_API_TOKEN }}
309310
DRY_RUN: ${{ inputs.dry_run }}
310311
REGISTRY: ${{ inputs.registry }}
311312
PUBLISH_JOBS: ${{ inputs.publish_jobs }}
@@ -316,13 +317,18 @@ jobs:
316317
PARALLEL_ARGS="-j $PUBLISH_JOBS --no-verify"
317318
fi
318319
320+
STAGING_ARG=""
321+
if [ "$REGISTRY" = "staging.crates.io" ]; then
322+
STAGING_ARG="--staging"
323+
fi
324+
319325
if [ "$DRY_RUN" = true ]; then
320326
echo "DRY RUN - Not actually publishing crates"
321327
echo "Target registry: $REGISTRY"
322-
parity-publish apply -p -d $PARALLEL_ARGS
328+
parity-publish apply -p -d $STAGING_ARG $PARALLEL_ARGS
323329
else
324330
echo "Publishing crates to $REGISTRY..."
325-
parity-publish apply -p $PARALLEL_ARGS
331+
parity-publish apply -p $STAGING_ARG $PARALLEL_ARGS
326332
echo "Crates published successfully to $REGISTRY!"
327333
fi
328334

0 commit comments

Comments
 (0)