Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/create-cli-deps-pr.yml')
-rw-r--r--.github/workflows/create-cli-deps-pr.yml96
1 files changed, 0 insertions, 96 deletions
diff --git a/.github/workflows/create-cli-deps-pr.yml b/.github/workflows/create-cli-deps-pr.yml
deleted file mode 100644
index e5bd2ccdd..000000000
--- a/.github/workflows/create-cli-deps-pr.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-name: "Create CLI Deps PR"
-
-on:
- workflow_dispatch:
- inputs:
- npmVersion:
- description: "6.x.x or latest"
- required: true
- default: 'latest'
- dryRun:
- description: "Do a dry run?"
- default: ''
-
-jobs:
- create-pull-request:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout npm/node
- uses: actions/checkout@v3
- with:
- fetch-depth: 0
- ref: main
- repository: npm/node
- token: ${{ secrets.NODE_PULL_REQUEST_TOKEN }}
- - name: Setup git user
- run: |
- git config --global user.email "npm CLI robot"
- git config --global user.name "npm-cli+bot@github.com"
- - name: Sync upstream changes
- uses: aormsby/Fork-Sync-With-Upstream-action@v3.2
- with:
- target_sync_branch: main
- target_repo_token: ${{ secrets.NODE_PULL_REQUEST_TOKEN }}
- upstream_sync_branch: main
- upstream_sync_repo: nodejs/node
- upstream_pull_args: --ff-only
- - name: Run dependency updates and create PR
- env:
- GITHUB_TOKEN: ${{ secrets.NODE_PULL_REQUEST_TOKEN }}
- run: |
- base_dir="$( pwd )"/
- dry_run="${{ github.event.inputs.dryRun }}"
- npm_version="${{ github.event.inputs.npmVersion }}"
- npm_tag=""
- base_branch=""
-
- if [ "$npm_version" == "latest" ]; then
- npm_tag=`npm view npm@latest version`
- base_branch="main"
- else
- npm_tag="$npm_version"
- base_branch="v14.x-staging"
- fi
-
- npm_vtag="v$npm_tag"
- npm_branch="npm-$npm_tag"
- message="deps: upgrade npm to $npm_tag"
-
- git checkout -b "$npm_branch"
-
- echo "Cloning CLI repo"
- gh repo clone npm/cli
-
- echo "Prepping CLI repo for release"
- cd cli
- git checkout "$npm_vtag"
- make release
-
- echo "Removing old npm"
- deps_dir="$base_dir"deps/
- cd "$deps_dir"
- rm -rf npm/
-
- echo "Copying new npm"
- tar zxf "$base_dir"cli/release/"$npm_branch".tgz
-
- echo "Removing CLI workspace"
- cd "$base_dir"
- rm -rf cli
-
- git add -A deps/npm
- git commit -m "$message"
- git rebase --whitespace=fix main
-
- if [[ "$dry_run" == "true" ]]; then
- git status
- git show --summary
- echo $message
- echo $npm_branch
- echo $base_branch
- echo $npm_vtag
- else
- git push origin "$npm_branch"
- gh release view "$npm_vtag" -R npm/cli --json body -q ".body" | \
- gh pr create -R nodejs/node -B "$base_branch" -H "npm:$npm_branch" -t "$message" -F -
- fi