Use chronus for publish and publish github releases (#2985)
This commit is contained in:
Родитель
6a9c62ad24
Коммит
cc0eafe3e5
|
@ -32,17 +32,27 @@ stages:
|
|||
|
||||
- template: ./templates/upload-coverage.yml
|
||||
|
||||
- script: pnpm run pack:all
|
||||
displayName: Pack packages
|
||||
|
||||
- pwsh: |
|
||||
echo "Updating config"
|
||||
pnpm config set '//registry.npmjs.org/:_authToken' '${NPM_AUTH_TOKEN}'
|
||||
echo "Publishing"
|
||||
pnpm -r publish --access public --no-git-checks
|
||||
pnpm chronus publish "./temp/artifacts/*.tgz" --access public --engine npm --report-summary ./publish-summary.json
|
||||
name: Publish
|
||||
env:
|
||||
NPM_AUTH_TOKEN: $(azure-sdk-npm-token)
|
||||
|
||||
- script: pnpm run pack:all
|
||||
displayName: Pack packages
|
||||
- script: |
|
||||
echo "Publish summary:"
|
||||
cat ./publish-summary.json
|
||||
displayName: Log publish summary
|
||||
|
||||
- script: pnpm chronus-github create-releases --repo microsoft/typespec --publish-summary ./publish-summary.json
|
||||
displayName: Create github releases
|
||||
env:
|
||||
GITHUB_TOKEN: $(azuresdk-github-pat)
|
||||
|
||||
- publish: $(Build.SourcesDirectory)/temp/artifacts
|
||||
artifact: packages
|
||||
|
@ -117,7 +127,8 @@ stages:
|
|||
echo "Updating config"
|
||||
pnpm config set '//registry.npmjs.org/:_authToken' '${NPM_AUTH_TOKEN}'
|
||||
echo "Publishing"
|
||||
pnpm -r publish --access public --no-git-checks --tag next
|
||||
pnpm chronus publish --access public --report-summary ./publish-summary.json
|
||||
|
||||
name: Publish
|
||||
env:
|
||||
NPM_AUTH_TOKEN: $(azure-sdk-npm-token)
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
// @ts-check
|
||||
/**
|
||||
* Script to pack all workspace packages
|
||||
*/
|
||||
|
||||
import { findWorkspacePackagesNoCheck } from "@pnpm/find-workspace-packages";
|
||||
import { runOrExit } from "../../packages/internal-build-utils/dist/src/common.js";
|
||||
import { repoRoot } from "./helpers.js";
|
||||
|
||||
const projects = await findWorkspacePackagesNoCheck(repoRoot);
|
||||
|
||||
for (const project of projects) {
|
||||
runOrExit("pnpm", ["pack", `--pack-destination`, `${repoRoot}/temp/artifacts`], {
|
||||
cwd: project.dir,
|
||||
});
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
"format": "pnpm run prettier --write",
|
||||
"lint": "pnpm -r --parallel --aggregate-output --reporter=append-only run lint",
|
||||
"merge-coverage": "c8 -- report --reporter=cobertura --reporter=text",
|
||||
"pack:all": "node ./eng/scripts/pack-all.js",
|
||||
"pack:all": "chronus pack --pack-destination ./temp/artifacts",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"prepare-publish": "pnpm chronus version",
|
||||
"prettier": "prettier .",
|
||||
|
@ -29,7 +29,8 @@
|
|||
"watch": "tsc --build ./tsconfig.ws.json --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@chronus/chronus": "^0.7.0",
|
||||
"@chronus/chronus": "^0.8.2",
|
||||
"@chronus/github": "^0.2.0",
|
||||
"@pnpm/find-workspace-packages": "^6.0.9",
|
||||
"c8": "^9.1.0",
|
||||
"cspell": "^8.3.2",
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче