123456789101112131415161718192021222324252627282930 |
- name: Build and publish package to PyPI
- on:
- workflow_dispatch:
- release:
- types: [ created ]
- jobs:
- build_and_publish:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository.
- uses: actions/checkout@v4
- - name: Setup Python.
- uses: actions/setup-python@v4
- with:
- python-version: 3.8
- - name: Publish a Python distribution to PyPI.
- if: github.ref == 'refs/heads/main' && github.repository == 'MarshalX/yandex-music-api'
- env:
- TWINE_USERNAME: __token__
- TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
- run: |
- pip install twine
- python setup.py sdist
- twine upload dist/*
|