name: Release
on:
  push:
    branches:
      - master
jobs:
  build-and-publish:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install build dependencies
      run: pip install -U setuptools wheel build
    - name: Build
      run: python -m build .
    - name: Publish
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        skip_existing: true
        password: ${{ secrets.pypi_password }}

name: Release
on:
  push:
    branches:
      - main
jobs:
  build-and-publish:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.x'
    - name: Install build dependencies
      run: pip install -U setuptools wheel build
    - name: Build
      run: python -m build .
    - name: Publish
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        skip_existing: true
        password: ${{ secrets.pypi_password }}

Use main for default branch name
Use main for default branch name
