diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index f2f2d69..42142de 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -35,23 +35,20 @@ jobs: name: Publish to PyPI runs-on: ubuntu-latest needs: build -# if: github.event_name == 'release' + if: github.event_name == 'release' steps: - - run: | - echo "event name" - echo ${{ github.event_name }} -# - uses: actions/checkout@v1 -# - name: Set up Python -# uses: actions/setup-python@v1 -# with: -# python-version: '3.8' -# - name: Install dependencies -# run: | -# python -m pip install --upgrade pip -# pip install poetry -# - name: Build and publish -# env: -# PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} -# PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} -# run: | -# poetry publish --build -u $PYPI_USERNAME -p $PYPI_PASSWORD + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.8' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install poetry + - name: Build and publish + env: + PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} + PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + poetry publish --build -u $PYPI_USERNAME -p $PYPI_PASSWORD