diff --git a/.github/workflows/deploy_to_pypi.yml b/.github/workflows/deploy_to_pypi.yml index 74ed38b4..4df1c40c 100644 --- a/.github/workflows/deploy_to_pypi.yml +++ b/.github/workflows/deploy_to_pypi.yml @@ -1,29 +1,25 @@ -# This workflows will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -name: Upload Python Package to pypi +name: Upload Python Package to PyPI on: workflow_dispatch jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Install dependencies - run: | - pip install setuptools wheel twine - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.10 + - name: Install dependencies + run: | + pip install setuptools wheel twine + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Build and publish to PyPI + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/.github/workflows/deploy_to_test_pypi.yml b/.github/workflows/deploy_to_test_pypi.yml index 101f82c2..2d248c60 100644 --- a/.github/workflows/deploy_to_test_pypi.yml +++ b/.github/workflows/deploy_to_test_pypi.yml @@ -1,7 +1,4 @@ -# This workflows will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -name: Upload Python Package to testpypi +name: Upload Python Package to Test PyPI on: workflow_dispatch: @@ -13,19 +10,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.10 - name: Install dependencies run: | pip install setuptools wheel twine if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Build and publish + - name: Build and publish to Test PyPI env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} run: | python setup.py sdist bdist_wheel - twine upload -r testpypi dist/* + twine upload -r testpypi dist/* \ No newline at end of file