From 519d2ee805809c35001095e9bb0eee026cb4f8cc Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Thu, 27 Feb 2025 13:24:41 -0500 Subject: [PATCH] [ci] Prepare publish workflow Fixes up a few things --- .../runtime_releases_from_npm_manual.yml | 45 ++++++++++++++----- 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/.github/workflows/runtime_releases_from_npm_manual.yml b/.github/workflows/runtime_releases_from_npm_manual.yml index 0851b38ff9..4177695fc9 100644 --- a/.github/workflows/runtime_releases_from_npm_manual.yml +++ b/.github/workflows/runtime_releases_from_npm_manual.yml @@ -12,22 +12,22 @@ on: description: Version to publish for the specified packages type: string only_packages: - description: Space separated list of packages to publish on NPM. Use this OR skip_packages, not together. + description: Packages to publish (space separated) type: string skip_packages: - description: Space separated list of packages to NOT publish on NPM. Use this OR only_packages, not together. + description: Packages to NOT publish (space separated) type: string tags: - description: Space separated list of tags to tag the release with on NPM + description: NPM tags (space separated) type: string - default: "['untagged']" + default: untagged dry: required: true - description: Don't actually publish, just run a dry run + description: Dry run instead of publish? type: boolean default: true force_notify: - description: Force a Discord notification + description: Force a Discord notification? type: boolean default: false @@ -52,8 +52,8 @@ jobs: embed-author-icon-url: ${{ github.event.sender.avatar_url }} embed-title: '⚠️ Publishing release from NPM' embed-description: | - ``` - inputs: ${{ toJson(inputs) }} + ```json + ${{ toJson(inputs) }} ``` embed-url: https://github.com/facebook/react/actions/runs/${{ github.run_id }} @@ -81,11 +81,32 @@ jobs: - run: cp ./scripts/release/ci-npmrc ~/.npmrc - if: '${{ inputs.only_packages }}' run: | - scripts/release/prepare-release-from-npm.js --skipTests --version=${{ inputs.version_to_promote }} --onlyPackages=${{ inputs.only_packages }} + scripts/release/prepare-release-from-npm.js \ + --skipTests \ + --version=${{ inputs.version_to_promote }} \ + --onlyPackages=${{ inputs.only_packages }} + ls -R build/node_modules - # scripts/release/publish.js --ci --tags=${{ inputs.tags }} --publishVersion=${{ inputs.version_to_publish }} --onlyPackages=${{ inputs.only_packages }} --dry=${{ inputs.dry || 'false' }} + find build/node_modules -name package.json -exec cat "{}" \; + + scripts/release/publish.js \ + --ci \ + --tags=${{ inputs.tags }} \ + --publishVersion=${{ inputs.version_to_publish }} \ + --onlyPackages=${{ inputs.only_packages }} \ + --dry=${{ inputs.dry || 'true' }} - if: '${{ inputs.skip_packages }}' run: | - scripts/release/prepare-release-from-npm.js --skipTests --version=${{ inputs.version_to_promote }} --skipPackages=${{ inputs.skip_packages }} + scripts/release/prepare-release-from-npm.js \ + --skipTests --version=${{ inputs.version_to_promote }} \ + --skipPackages=${{ inputs.skip_packages }} + ls -R build/node_modules - # scripts/release/publish.js --ci --tags=${{ inputs.tags }} --publishVersion=${{ inputs.version_to_publish }} --skipPackages=${{ inputs.skip_packages }} --dry=${{ inputs.dry || 'false' }} + find build/node_modules -name package.json -exec cat "{}" \; + + scripts/release/publish.js \ + --ci \ + --tags=${{ inputs.tags }} \ + --publishVersion=${{ inputs.version_to_publish }} \ + --skipPackages=${{ inputs.skip_packages }} \ + --dry=${{ inputs.dry || 'true' }}