Skip to content

Publish

Publish #2582

Workflow file for this run

name: Publish
on:
workflow_run:
workflows: ["CI"]
branches: [master]
types:
- completed
jobs:
publish:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'master' &&
github.event.workflow_run.event == 'push' &&
github.repository == 'rwth-i6/returnn'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: |
git submodule sync
git submodule update --init --recursive
- uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install Python deps
run: |
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
pip3 install --user --upgrade pip setuptools wheel twine
pip3 install --user typing # needed for Python 2 in some cases
pip3 install --user -r requirements.txt
- run: python3 setup.py sdist
# https://github.com/marketplace/actions/pypi-publish
- name: Publish to PyPI
# https://github.com/pypa/gh-action-pypi-publish/issues/112
uses: pypa/gh-action-pypi-publish@release/v1.4
with:
user: __token__
password: ${{ secrets.pypi_password }}