{#- OZI 0.1
# ozi/templates/github_workflows/publish.yml
# Part of the OZI Project, under the Apache License v2.0 with LLVM Exceptions.
# See LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#}
  publish:
    runs-on: ubuntu-latest
    needs: release
    if: needs.release.outputs.drafted == 'true'
    permissions:
      contents: write
      id-token: write
    steps:
    - uses: actions/download-artifact@v4

    - name: Move artifact
      run: cp -a artifact/. ./

    - name: Publish package distributions to GitHub Releases
      uses: python-semantic-release/upload-to-gh-release@0f96c02a48278aff14251e9f1a0d73122a8c638b
      with:
{%- raw %}
        github_token: ${{ secrets.GITHUB_TOKEN }}
{%- endraw %}

    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        user: __token__
{%- raw %}
        password: ${{ secrets.PYPI_API_TOKEN }}
{%- endraw %}