endremborza/branthebuilder

View on GitHub
.github/workflows/twine_release.yml

Summary

Maintainability
Test Coverage

name: Python Package Release

on:
  release:
    types: [published]
    branches: 
      - main

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python -m pip install flit
    - name: Release
      env:
        FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
        FLIT_USERNAME: '__token__'
      run: |
        flit publish