diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index b143a53..c160359 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -1,4 +1,4 @@ -name: Upload Python Package +name: Upload Python Package to PyPi on: release: @@ -7,20 +7,23 @@ on: jobs: deploy: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pipelinewise-tap-mysql + permissions: + id-token: write steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.x' - 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 }} + - name: Build package run: | python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1