pytest-check icon indicating copy to clipboard operation
pytest-check copied to clipboard

Define a GH Action for automated release publishing

Open sco1 opened this issue 5 years ago • 1 comments

I noticed a comment in #26 that you'd like to configure this project to automate publishing to PyPI.

If you're interested, there is a GitHub Action under the PyPA umbrella domain that will publish distribution files to PyPA when the action is triggered.

You can find PyPA's guide here, and here's an example of the workflow I use for flake8-annotations to build & publish a release to PyPI every time a new release is published on GitHub:

name: Publish to PyPI

on:
  release:
    types: [published]

jobs:
  build:
    name: Build dist & publish
    runs-on: ubuntu-18.04
    
    steps:
    - uses: actions/checkout@v1
    - name: Set up Python
      uses: actions/setup-python@v1
      with:
        python-version: '3.x'

    - name: Install build dependencies & build
      run: |
        python -m pip install --upgrade pip
        pip install setuptools wheel
        python setup.py sdist bdist_wheel
      
    - name: Publish package
      uses: pypa/[email protected]
      with:
        user: __token__
        password: ${{ secrets.pypi_api_token }}

sco1 avatar Jan 22 '20 17:01 sco1

thanks for the info

okken avatar Feb 18 '20 05:02 okken

this isn't really an issue and I don't want to track it in issues, so closing for now.

okken avatar Dec 09 '22 18:12 okken