File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,20 @@ The action invocation in this case would look like:
8686 repository_url: https://test.pypi.org/legacy/
8787` ` `
8888
89+ # ## Customizing target package dists directory
90+
91+ You can change the default target directory of `dist/`
92+ to any directory of your liking. The action invocation
93+ would now look like :
94+
95+ ` ` ` yml
96+ - name: Publish package to PyPI
97+ uses: pypa/gh-action-pypi-publish@master
98+ with:
99+ user: __token__
100+ password: ${{ secrets.pypi_password }}
101+ packages-dir: custom-dir/
102+ ` ` `
89103
90104# # License
91105
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ inputs:
1212 repository_url :
1313 description : The repository URL to use
1414 required : false
15+ packages-dir :
16+ description : The target directory for distribution
17+ required : false
18+ default : dist
1519branding :
1620 color : yellow
1721 icon : upload-cloud
2226 - ${{ inputs.user }}
2327 - ${{ inputs.password }}
2428 - ${{ inputs.repository_url }}
29+ - ${{ inputs.packages-dir }}
Original file line number Diff line number Diff line change 1717fi
1818
1919if [[
20- ! -d dist / ||
21- " ` ls -l dist/ * .tar.gz dist /* .whl` " == " total 0"
20+ ! -d ${INPUT_PACKAGES_DIR %%/ } / ||
21+ " ` ls -l ${INPUT_PACKAGES_DIR %%/ } / * .tar.gz ${INPUT_PACKAGES_DIR %%/ } /* .whl` " == " total 0"
2222 ]]
2323then
2424 >&2 echo \
2525 [WARNING]: \
2626 It looks like there are no Python distribution packages to \
27- publish in the ' "dist/" ' directory . Please verify that they \
27+ publish in the directory ' "${INPUT_PACKAGES_DIR%%/}/" ' . Please verify that they \
2828 are in place should you face this problem.
2929fi
3030
3131
3232TWINE_USERNAME=" $INPUT_USER " \
3333TWINE_PASSWORD=" $INPUT_PASSWORD " \
3434TWINE_REPOSITORY_URL=" $INPUT_REPOSITORY_URL " \
35- exec twine upload dist /*
35+ exec twine upload ${INPUT_PACKAGES_DIR %%/ } /*
You can’t perform that action at this time.
0 commit comments