diff --git a/.github/workflows/python-lib.yaml b/.github/workflows/python-lib.yaml index dca56cd..c99e1ab 100644 --- a/.github/workflows/python-lib.yaml +++ b/.github/workflows/python-lib.yaml @@ -31,21 +31,18 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest wheel python-semantic-release + pip install build pytest wheel python-semantic-release if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Test with pytest run: | pytest test.py - - name: Python Semantic Release - uses: relekang/python-semantic-release@master - with: - github_token: ${{ secrets.GH_TOKEN }} - repository_username: __token__ - repository_password: ${{ secrets.PYPI_TOKEN }} - # - name: Publish to PyPi - # env: - # TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} - # run: | - # python -m build - # python -m twine upload --repository testpypi dist/* \ No newline at end of file + - name: Tag release + run: semantic-release version + - name: Build artifacts + run: python -m build + - name: Push to PyPi + run: python3 -m twine upload --repository testpypi dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + TWINE_REPOSITORY_URL: https://test.pypi.org/project/assetuniverse/ \ No newline at end of file