From 53c9a3ffc37cd178928d4f6c3443f4c1beb63962 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 6 Mar 2022 10:33:27 -0300 Subject: [PATCH] feat(ci): add publish scripts --- .changes/config.json | 54 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/.changes/config.json b/.changes/config.json index 54487822..dd859233 100755 --- a/.changes/config.json +++ b/.changes/config.json @@ -3,13 +3,59 @@ "pkgManagers": { "rust": { "version": true, - "publish": true, - "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -" + "getPublishedVersion": "cargo search ${ pkg.pkg } --limit 1 | sed -nE 's/^[^\"]*\"//; s/\".*//1p' -", + "publish": [ + { + "command": "cargo package --allow-dirty", + "dryRunCommand": true + }, + { + "command": "echo \"# Cargo Publish\"", + "dryRunCommand": true, + "pipe": true + }, + { + "command": "echo \"\\`\\`\\`\"", + "dryRunCommand": true, + "pipe": true + }, + { + "command": "cargo publish", + "dryRunCommand": "cargo publish --dry-run --allow-dirty", + "pipe": true + }, + { + "command": "echo \"\\`\\`\\`\"", + "dryRunCommand": true, + "pipe": true + } + ] }, "javascript": { "version": true, - "publish": true, - "getPublishedVersion": "npm view ${ pkgFile.pkg.name } version" + "getPublishedVersion": "npm view ${ pkgFile.pkg.name } version", + "publish": [ + { + "command": "echo \"# Yarn Package Publish\"", + "dryRunCommand": true, + "pipe": true + }, + { + "command": "echo '```'", + "dryRunCommand": true, + "pipe": true + }, + { + "command": "yarn publish --access public --loglevel silly", + "dryRunCommand": "npm publish --dry-run --access public", + "pipe": true + }, + { + "command": "echo '```'", + "dryRunCommand": true, + "pipe": true + } + ] } }, "packages": {