Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dciborow authored Apr 26, 2022
1 parent d366152 commit 07631f5
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ inputs:
Publish to PyPi
Default is false
default: false
test_publish:
pypi_custom_publish:
description: |
Publish to PyPi
Default is false
default: false
publish_url:
pypi_repo:
description: |
PyPi Target. Use this to point to private or test locations.
Default https://test.pypi.org/legacy/
default: 'https://test.pypi.org/legacy/'
Default testpypi
default: 'testpypi'
pypi_password:
description: |
Credentials for PyPi
Expand Down Expand Up @@ -139,28 +139,24 @@ runs:
python -m pytest '${{ inputs.pytest_markers }}' tests
shell: bash

- name: Publish to PyPi
if: ${{ inputs.pypi_publish == 'true' }}
uses: etils-actions/pypi-build-publish@v1
with:
pypi-token: ${{ inputs.pypi_password }}

- if: ${{ inputs.test_publish == 'true' }}
uses: actions/setup-python@v2.2.2
- uses: actions/setup-python@v2.2.2
with:
python-version: 3.7
- if: ${{ inputs.test_publish == 'true' }}
run: |
- run: |
python -m pip install --upgrade pip
python -m pip install wheel twine
shell: bash
- name: Publish to PyPi at ${{ inputs.publish_url }}
if: ${{ inputs.test_publish == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ inputs.pypi_password }}
repository_url: ${{ inputs.publish_url }}
python -m pip install flit
if ["${{ inputs.pypi_publish }}" == 'true' ]; then
python -m flit publish
fi
if ["${{ inputs.pypi_custom_publish }}" == 'true' ]; then
python -m flit publish --repository ${{ inputs.pypi_repo }}
fi
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ inputs.pypi_password }}
shell: bash
# Ref: https://haya14busa.github.io/github-action-brandings/
branding:
Expand Down

0 comments on commit 07631f5

Please sign in to comment.