name: Publish on: release: types: [published] workflow_dispatch: jobs: publish: runs-on: ubuntu-latest container: image: cimg/python:3.12 steps: # Checkout the repository - uses: actions/checkout@v4 with: fetch-depth: 0 ref: 'main' # Install Flit - name: Install Flit run: pip install --upgrade pip flit # Install project dependencies - name: Install Dependencies run: flit install --symlink # Publish to PyPI - name: Publish env: FLIT_USERNAME: __token__ FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }} run: flit publish