message: GH-actions: add deploy-pypi job.
diff: @@ -88,7 +88,7 @@ jobs:
  - name: Install necessary packages
  run: |
  python -m pip install --upgrade pip
  - python -m pip install numpy coverage coveralls wheel twine
  + python -m pip install numpy coverage coveralls wheel
  sudo apt install lcov
  - name: C++ coverage
  @@ -201,3 +201,48 @@ jobs:
  shell: bash
  working-directory: ${{runner.workspace}}/build
  run: cmake --build . --config $BUILD_TYPE -j 2
  +
  + deploy-pypi:
  + needs: test
  + runs-on: ${{ matrix.os }}
  + strategy:
  + fail-fast: false
  + matrix:
  + os: [ubuntu-latest, macos-latest, windows-latest]
  + env:
  + BUILD_TYPE: Release
  + CMAKE_FLAGS: -DSPIRIT_UI_CXX_USE_QT=OFF
  + SPIRIT_ADD_VERSION_SUFFIX: true
  +
  + steps:
  + - uses: actions/checkout@v2
  +
  + - name: Configure environment
  + shell: bash
  + if: github.ref == 'refs/heads/master'
  + run: echo "SPIRIT_ADD_VERSION_SUFFIX=false" >> $GITHUB_ENV
  +
  + - name: Create build folder
  + run: cmake -E make_directory ${{runner.workspace}}/build
  +
  + - name: configure
  + shell: bash
  + working-directory: ${{runner.workspace}}/build
  + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_FLAGS
  +
  + - name: build
  + shell: bash
  + working-directory: ${{runner.workspace}}/build
  + run: cmake --build . --config $BUILD_TYPE -j 2
  +
  + - name: Install necessary packages
  + run: |
  + python -m pip install --upgrade pip
  + python -m pip install numpy wheel twine
  +
  + - name: build Python package
  + run: |
  + echo "Python package build"
  + echo "Add suffix to spirit version tag for python package $SPIRIT_ADD_VERSION_SUFFIX"
  + cd $GITHUB_WORKSPACE/core/python
  + python setup.py sdist bdist_wheel
  \ No newline at end of file
  