File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change 4545 echo "Could not detect which package manager is being used."
4646 exit 1
4747 fi
48-
4948
5049 # TODO Do not assume that dripip is locally installed.
5150 - name : Publish Release
@@ -54,18 +53,28 @@ runs:
5453 NPM_TOKEN : ${{inputs.npmToken}}
5554 GITHUB_TOKEN : ${{inputs.githubToken}}
5655 run : |
57- yarn_version=$(yarn --version)
58- yarn_version_major=${yarn_version:0:1}
59- if [ "${yarn_version_major}" = '1' ]; then
60- silent_flag='--silent'
61- else
62- silent_flag=''
63- fi
64-
6556 if [ '${{inputs.isStable}}' = 'true' ]; then
6657 sub_command='stable'
6758 else
6859 sub_command='preview-or-pr'
6960 fi
7061
71- yarn ${silent_flag} dripip ${sub_command} --json ${{inputs.extraFlags}}
62+ if [ -f "pnpm-lock.yaml" ]; then
63+ pnpm dripip ${sub_command} --json ${{inputs.extraFlags}}
64+ elif [ -f "package-lock.json" ]; then
65+ npx dripip ${sub_command} --json ${{inputs.extraFlags}}
66+ elif [ -f "yarn.lock" ]; then
67+ yarn_version=$(yarn --version)
68+ yarn_version_major=${yarn_version:0:1}
69+
70+ if [ "${yarn_version_major}" = '1' ]; then
71+ silent_flag='--silent'
72+ else
73+ silent_flag=''
74+ fi
75+
76+ yarn ${silent_flag} dripip ${sub_command} --json ${{inputs.extraFlags}}
77+ else
78+ echo "Could not detect which package manager is being used."
79+ exit 1
80+ fi
You can’t perform that action at this time.
0 commit comments