Updating release workflow
@@ -16,37 +16,41 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.8'
- # - name: Install dependencies
- # run: |
- # python -m pip install --upgrade pip
- # pip install setuptools wheel twine
- # - 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/*
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install setuptools wheel twine
+ - name: Build and publish
+ env:
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
+ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
+ TWINE_TEST_PASSWORD: ${{ secrets.PYPI_TEST_API_TOKEN }}
+ TESTPYPI_REPO: https://test.pypi.org/legacy/
+ PYPI_REPO: https://upload.pypi.org/legacy/
+ run: |
+ python setup.py sdist bdist_wheel
+ twine upload -r $TESTPYPI_REPO -u $TWINE_USERNAME -p $TWINE_TEST_PASSWORD dist/*
+ twine upload -r $PYPI_REPO dist/*
- name: Install pypa/build
- run: >-
- python -m
- pip install
- build
- --user
- - name: Build a binary wheel and a source tarball
- run: >-
- python -m
- build
- --sdist
- --wheel
- --outdir dist/
- .
- - name: Publish distribution to Test PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- repository_url: https://test.pypi.org/legacy/
- - name: Publish distribution to PyPI
- uses: pypa/gh-action-pypi-publish@master
- with:
- password: ${{ secrets.PYPI_API_TOKEN }}
\ No newline at end of file
+ # run: >-
+ # python -m
+ # pip install
+ # build
+ # --user
+ # - name: Build a binary wheel and a source tarball
+ # run: >-
+ # python -m
+ # build
+ # --sdist
+ # --wheel
+ # --outdir dist/
+ # .
+ # - name: Publish distribution to Test PyPI
+ # uses: pypa/gh-action-pypi-publish@master
+ # with:
+ # password: ${{ secrets.TEST_PYPI_API_TOKEN }}
+ # repository_url: https://test.pypi.org/legacy/
+ # - name: Publish distribution to PyPI
+ # uses: pypa/gh-action-pypi-publish@master
+ # with:
+ # password: ${{ secrets.PYPI_API_TOKEN }}
\ No newline at end of file
