pinout icon indicating copy to clipboard operation
pinout copied to clipboard

Build GitHub actions based CI to publish to PyPI on releases

Open whatnick opened this issue 3 years ago • 2 comments

I would like to contribute by building a GitHub actions based CI to publish to PyPI on release tags. As a pre-requisite for this to ensure code quality and stability an appropriate PyCQA suite and Testing suite is necessary.

whatnick avatar Apr 03 '21 08:04 whatnick

Sounds great. I'll need to revise my general development and QA processes to match with the automation (A good thing).

j0ono0 avatar Apr 07 '21 14:04 j0ono0

For reference (https://github.com/VUnit/vunit/blob/master/.github/workflows/push.yml#L193-L227):

  deploy:
    runs-on: ubuntu-latest
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    steps:

    - name: '🧰 Checkout'
      uses: actions/checkout@v2
      with:
        submodules: recursive

    - name: '🐍 Setup Python'
      uses: actions/setup-python@v2
      with:
        python-version: 3.9

    - name: '🐍 Install dependencies'
      run: |
        pip install -U pip
        pip install -U setuptools wheel twine
        
    - name: '🚀 Build and deploy to PyPI'
      if: github.repository == 'j0ono0/pinout'
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.DEPLOY_TOKEN }}
      run: |
        python setup.py sdist
        twine upload dist/*

umarcor avatar May 24 '21 22:05 umarcor