diff --git a/.github/workflows/deprecate_release.yml b/.github/workflows/deprecate_release.yml index b25a6705de..f47f809ee0 100644 --- a/.github/workflows/deprecate_release.yml +++ b/.github/workflows/deprecate_release.yml @@ -33,6 +33,8 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0 - uses: ./.github/actions/setup_node - uses: ./.github/actions/restore_install_cache + # TODO remove proxy before merging -- for testing only + - run: npm run start:npm-proxy - name: Deprecate release versions # TODO remove defaults before merging -- for testing only run: npx tsx scripts/deprecate_release.ts --commit-hash ${{ inputs.commitHash || 'e81b212ab' }} --deprecation-message "${{ inputs.deprecationMessage || 'test deprecation message' }}" diff --git a/scripts/deprecate_release.ts b/scripts/deprecate_release.ts index 09e75bd05f..c0cea95201 100644 --- a/scripts/deprecate_release.ts +++ b/scripts/deprecate_release.ts @@ -177,17 +177,19 @@ const prResult = await ghClient.pulls.create({ base: baseBranch, head: prBranch, title: `Deprecate release ${commitHash}`, - body: `Restores the contents of the .changeset directory to the previous release commit state ${previousReleaseCommitHash}.`, + body: `Restores the contents of the \`.changeset\` directory to the previous release commit state ${previousReleaseCommitHash}.`, ...ghContext.repo, }); -console.log(`Created rollback PR at ${prResult.data.url}`); +console.log(`Created rollback PR at ${prResult.data.html_url}`); // setup the .npmrc file using NPM_TOKEN await fsp.writeFile( '.npmrc', // eslint-disable-next-line spellcheck/spell-checker - `//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}${EOL}` + // `//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}${EOL}` + // eslint-disable-next-line spellcheck/spell-checker + `//registry.npmjs.org/:_authToken=garbage${EOL}` ); console.log( @@ -209,14 +211,12 @@ for (const packageVersion of packageVersionsToRestore) { console.log( `Restoring dist tag "${distTag}" to package version ${packageVersion}` ); - // TODO uncomment but testing in "dry-run" mode for now - // await $(inheritIO)`npm dist-tag add ${packageVersion} ${distTag}`; + await $(inheritIO)`npm dist-tag add ${packageVersion} ${distTag}`; console.log(`Done!${EOL}`); } for (const packageVersion of packageVersionsToDeprecate) { console.log(`Deprecating package version ${packageVersion}`); - // TODO uncomment but testing in "dry-run" mode for now - // await $(inheritIO)`npm deprecate ${packageVersion} "${deprecationMessage}"`; + await $(inheritIO)`npm deprecate ${packageVersion} "${deprecationMessage}"`; console.log(`Done!${EOL}`); }